diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2008-05-28 10:43:48 -0400 |
---|---|---|
committer | Lennert Buytenhek <buytenh@marvell.com> | 2008-06-22 16:44:57 -0400 |
commit | 79e90dd5aa95adfdc3117db8a559da3d0195ba58 (patch) | |
tree | be2a760b39e8f295aca136da03c05490c77a0b48 /arch/arm/mach-orion5x | |
parent | 0e3bc0503f7e7b5b0bd4416f43eeeca1b661e66e (diff) |
[ARM] Orion: nuke orion5x_{read,write}
Nuke the Orion-specific orion5x_{read,write} wrappers.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Diffstat (limited to 'arch/arm/mach-orion5x')
-rw-r--r-- | arch/arm/mach-orion5x/addr-map.c | 18 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/db88f5281-setup.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/dns323-setup.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/gpio.c | 40 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/irq.c | 18 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/pci.c | 34 |
6 files changed, 57 insertions, 57 deletions
diff --git a/arch/arm/mach-orion5x/addr-map.c b/arch/arm/mach-orion5x/addr-map.c index 267e9f960a54..6f0dbda6c44c 100644 --- a/arch/arm/mach-orion5x/addr-map.c +++ b/arch/arm/mach-orion5x/addr-map.c | |||
@@ -94,16 +94,16 @@ static void __init setup_cpu_win(int win, u32 base, u32 size, | |||
94 | return; | 94 | return; |
95 | } | 95 | } |
96 | 96 | ||
97 | orion5x_write(CPU_WIN_BASE(win), base & 0xffff0000); | 97 | writel(base & 0xffff0000, CPU_WIN_BASE(win)); |
98 | orion5x_write(CPU_WIN_CTRL(win), | 98 | writel(((size - 1) & 0xffff0000) | (attr << 8) | (target << 4) | 1, |
99 | ((size - 1) & 0xffff0000) | (attr << 8) | (target << 4) | 1); | 99 | CPU_WIN_CTRL(win)); |
100 | 100 | ||
101 | if (orion5x_cpu_win_can_remap(win)) { | 101 | if (orion5x_cpu_win_can_remap(win)) { |
102 | if (remap < 0) | 102 | if (remap < 0) |
103 | remap = base; | 103 | remap = base; |
104 | 104 | ||
105 | orion5x_write(CPU_WIN_REMAP_LO(win), remap & 0xffff0000); | 105 | writel(remap & 0xffff0000, CPU_WIN_REMAP_LO(win)); |
106 | orion5x_write(CPU_WIN_REMAP_HI(win), 0); | 106 | writel(0, CPU_WIN_REMAP_HI(win)); |
107 | } | 107 | } |
108 | } | 108 | } |
109 | 109 | ||
@@ -116,11 +116,11 @@ void __init orion5x_setup_cpu_mbus_bridge(void) | |||
116 | * First, disable and clear windows. | 116 | * First, disable and clear windows. |
117 | */ | 117 | */ |
118 | for (i = 0; i < 8; i++) { | 118 | for (i = 0; i < 8; i++) { |
119 | orion5x_write(CPU_WIN_BASE(i), 0); | 119 | writel(0, CPU_WIN_BASE(i)); |
120 | orion5x_write(CPU_WIN_CTRL(i), 0); | 120 | writel(0, CPU_WIN_CTRL(i)); |
121 | if (orion5x_cpu_win_can_remap(i)) { | 121 | if (orion5x_cpu_win_can_remap(i)) { |
122 | orion5x_write(CPU_WIN_REMAP_LO(i), 0); | 122 | writel(0, CPU_WIN_REMAP_LO(i)); |
123 | orion5x_write(CPU_WIN_REMAP_HI(i), 0); | 123 | writel(0, CPU_WIN_REMAP_HI(i)); |
124 | } | 124 | } |
125 | } | 125 | } |
126 | 126 | ||
diff --git a/arch/arm/mach-orion5x/db88f5281-setup.c b/arch/arm/mach-orion5x/db88f5281-setup.c index 00ad36ade57e..88405e74e5e3 100644 --- a/arch/arm/mach-orion5x/db88f5281-setup.c +++ b/arch/arm/mach-orion5x/db88f5281-setup.c | |||
@@ -330,7 +330,7 @@ static void __init db88f5281_init(void) | |||
330 | orion5x_init(); | 330 | orion5x_init(); |
331 | 331 | ||
332 | orion5x_mpp_conf(db88f5281_mpp_modes); | 332 | orion5x_mpp_conf(db88f5281_mpp_modes); |
333 | orion5x_write(MPP_DEV_CTRL, 0); /* DEV_D[31:16] */ | 333 | writel(0, MPP_DEV_CTRL); /* DEV_D[31:16] */ |
334 | 334 | ||
335 | /* | 335 | /* |
336 | * Configure peripherals. | 336 | * Configure peripherals. |
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c index 64730a045ff6..3791ca6f001a 100644 --- a/arch/arm/mach-orion5x/dns323-setup.c +++ b/arch/arm/mach-orion5x/dns323-setup.c | |||
@@ -269,7 +269,7 @@ static void __init dns323_init(void) | |||
269 | orion5x_init(); | 269 | orion5x_init(); |
270 | 270 | ||
271 | orion5x_mpp_conf(dns323_mpp_modes); | 271 | orion5x_mpp_conf(dns323_mpp_modes); |
272 | orion5x_write(MPP_DEV_CTRL, 0); /* DEV_D[31:16] */ | 272 | writel(0, MPP_DEV_CTRL); /* DEV_D[31:16] */ |
273 | 273 | ||
274 | /* | 274 | /* |
275 | * Configure peripherals. | 275 | * Configure peripherals. |
diff --git a/arch/arm/mach-orion5x/gpio.c b/arch/arm/mach-orion5x/gpio.c index 9fba6a16dc1b..d09797990f41 100644 --- a/arch/arm/mach-orion5x/gpio.c +++ b/arch/arm/mach-orion5x/gpio.c | |||
@@ -96,10 +96,10 @@ int gpio_get_value(unsigned pin) | |||
96 | { | 96 | { |
97 | int val, mask = 1 << pin; | 97 | int val, mask = 1 << pin; |
98 | 98 | ||
99 | if (orion5x_read(GPIO_IO_CONF) & mask) | 99 | if (readl(GPIO_IO_CONF) & mask) |
100 | val = orion5x_read(GPIO_DATA_IN) ^ orion5x_read(GPIO_IN_POL); | 100 | val = readl(GPIO_DATA_IN) ^ readl(GPIO_IN_POL); |
101 | else | 101 | else |
102 | val = orion5x_read(GPIO_OUT); | 102 | val = readl(GPIO_OUT); |
103 | 103 | ||
104 | return val & mask; | 104 | return val & mask; |
105 | } | 105 | } |
@@ -191,39 +191,39 @@ void gpio_display(void) | |||
191 | printk("GPIO, free\n"); | 191 | printk("GPIO, free\n"); |
192 | } else { | 192 | } else { |
193 | printk("GPIO, used by %s, ", gpio_label[i]); | 193 | printk("GPIO, used by %s, ", gpio_label[i]); |
194 | if (orion5x_read(GPIO_IO_CONF) & (1 << i)) { | 194 | if (readl(GPIO_IO_CONF) & (1 << i)) { |
195 | printk("input, active %s, level %s, edge %s\n", | 195 | printk("input, active %s, level %s, edge %s\n", |
196 | ((orion5x_read(GPIO_IN_POL) >> i) & 1) ? "low" : "high", | 196 | ((readl(GPIO_IN_POL) >> i) & 1) ? "low" : "high", |
197 | ((orion5x_read(GPIO_LEVEL_MASK) >> i) & 1) ? "enabled" : "masked", | 197 | ((readl(GPIO_LEVEL_MASK) >> i) & 1) ? "enabled" : "masked", |
198 | ((orion5x_read(GPIO_EDGE_MASK) >> i) & 1) ? "enabled" : "masked"); | 198 | ((readl(GPIO_EDGE_MASK) >> i) & 1) ? "enabled" : "masked"); |
199 | } else { | 199 | } else { |
200 | printk("output, val=%d\n", (orion5x_read(GPIO_OUT) >> i) & 1); | 200 | printk("output, val=%d\n", (readl(GPIO_OUT) >> i) & 1); |
201 | } | 201 | } |
202 | } | 202 | } |
203 | } | 203 | } |
204 | 204 | ||
205 | printk(KERN_DEBUG "MPP_0_7_CTRL (0x%08x) = 0x%08x\n", | 205 | printk(KERN_DEBUG "MPP_0_7_CTRL (0x%08x) = 0x%08x\n", |
206 | MPP_0_7_CTRL, orion5x_read(MPP_0_7_CTRL)); | 206 | MPP_0_7_CTRL, readl(MPP_0_7_CTRL)); |
207 | printk(KERN_DEBUG "MPP_8_15_CTRL (0x%08x) = 0x%08x\n", | 207 | printk(KERN_DEBUG "MPP_8_15_CTRL (0x%08x) = 0x%08x\n", |
208 | MPP_8_15_CTRL, orion5x_read(MPP_8_15_CTRL)); | 208 | MPP_8_15_CTRL, readl(MPP_8_15_CTRL)); |
209 | printk(KERN_DEBUG "MPP_16_19_CTRL (0x%08x) = 0x%08x\n", | 209 | printk(KERN_DEBUG "MPP_16_19_CTRL (0x%08x) = 0x%08x\n", |
210 | MPP_16_19_CTRL, orion5x_read(MPP_16_19_CTRL)); | 210 | MPP_16_19_CTRL, readl(MPP_16_19_CTRL)); |
211 | printk(KERN_DEBUG "MPP_DEV_CTRL (0x%08x) = 0x%08x\n", | 211 | printk(KERN_DEBUG "MPP_DEV_CTRL (0x%08x) = 0x%08x\n", |
212 | MPP_DEV_CTRL, orion5x_read(MPP_DEV_CTRL)); | 212 | MPP_DEV_CTRL, readl(MPP_DEV_CTRL)); |
213 | printk(KERN_DEBUG "GPIO_OUT (0x%08x) = 0x%08x\n", | 213 | printk(KERN_DEBUG "GPIO_OUT (0x%08x) = 0x%08x\n", |
214 | GPIO_OUT, orion5x_read(GPIO_OUT)); | 214 | GPIO_OUT, readl(GPIO_OUT)); |
215 | printk(KERN_DEBUG "GPIO_IO_CONF (0x%08x) = 0x%08x\n", | 215 | printk(KERN_DEBUG "GPIO_IO_CONF (0x%08x) = 0x%08x\n", |
216 | GPIO_IO_CONF, orion5x_read(GPIO_IO_CONF)); | 216 | GPIO_IO_CONF, readl(GPIO_IO_CONF)); |
217 | printk(KERN_DEBUG "GPIO_BLINK_EN (0x%08x) = 0x%08x\n", | 217 | printk(KERN_DEBUG "GPIO_BLINK_EN (0x%08x) = 0x%08x\n", |
218 | GPIO_BLINK_EN, orion5x_read(GPIO_BLINK_EN)); | 218 | GPIO_BLINK_EN, readl(GPIO_BLINK_EN)); |
219 | printk(KERN_DEBUG "GPIO_IN_POL (0x%08x) = 0x%08x\n", | 219 | printk(KERN_DEBUG "GPIO_IN_POL (0x%08x) = 0x%08x\n", |
220 | GPIO_IN_POL, orion5x_read(GPIO_IN_POL)); | 220 | GPIO_IN_POL, readl(GPIO_IN_POL)); |
221 | printk(KERN_DEBUG "GPIO_DATA_IN (0x%08x) = 0x%08x\n", | 221 | printk(KERN_DEBUG "GPIO_DATA_IN (0x%08x) = 0x%08x\n", |
222 | GPIO_DATA_IN, orion5x_read(GPIO_DATA_IN)); | 222 | GPIO_DATA_IN, readl(GPIO_DATA_IN)); |
223 | printk(KERN_DEBUG "GPIO_LEVEL_MASK (0x%08x) = 0x%08x\n", | 223 | printk(KERN_DEBUG "GPIO_LEVEL_MASK (0x%08x) = 0x%08x\n", |
224 | GPIO_LEVEL_MASK, orion5x_read(GPIO_LEVEL_MASK)); | 224 | GPIO_LEVEL_MASK, readl(GPIO_LEVEL_MASK)); |
225 | printk(KERN_DEBUG "GPIO_EDGE_CAUSE (0x%08x) = 0x%08x\n", | 225 | printk(KERN_DEBUG "GPIO_EDGE_CAUSE (0x%08x) = 0x%08x\n", |
226 | GPIO_EDGE_CAUSE, orion5x_read(GPIO_EDGE_CAUSE)); | 226 | GPIO_EDGE_CAUSE, readl(GPIO_EDGE_CAUSE)); |
227 | printk(KERN_DEBUG "GPIO_EDGE_MASK (0x%08x) = 0x%08x\n", | 227 | printk(KERN_DEBUG "GPIO_EDGE_MASK (0x%08x) = 0x%08x\n", |
228 | GPIO_EDGE_MASK, orion5x_read(GPIO_EDGE_MASK)); | 228 | GPIO_EDGE_MASK, readl(GPIO_EDGE_MASK)); |
229 | } | 229 | } |
diff --git a/arch/arm/mach-orion5x/irq.c b/arch/arm/mach-orion5x/irq.c index dd21f38c5d37..e2a0084ab4a3 100644 --- a/arch/arm/mach-orion5x/irq.c +++ b/arch/arm/mach-orion5x/irq.c | |||
@@ -82,7 +82,7 @@ static int orion5x_gpio_set_irq_type(u32 irq, u32 type) | |||
82 | int pin = irq_to_gpio(irq); | 82 | int pin = irq_to_gpio(irq); |
83 | struct irq_desc *desc; | 83 | struct irq_desc *desc; |
84 | 84 | ||
85 | if ((orion5x_read(GPIO_IO_CONF) & (1 << pin)) == 0) { | 85 | if ((readl(GPIO_IO_CONF) & (1 << pin)) == 0) { |
86 | printk(KERN_ERR "orion5x_gpio_set_irq_type failed " | 86 | printk(KERN_ERR "orion5x_gpio_set_irq_type failed " |
87 | "(irq %d, pin %d).\n", irq, pin); | 87 | "(irq %d, pin %d).\n", irq, pin); |
88 | return -EINVAL; | 88 | return -EINVAL; |
@@ -117,7 +117,7 @@ static int orion5x_gpio_set_irq_type(u32 irq, u32 type) | |||
117 | /* | 117 | /* |
118 | * set initial polarity based on current input level | 118 | * set initial polarity based on current input level |
119 | */ | 119 | */ |
120 | if ((orion5x_read(GPIO_IN_POL) ^ orion5x_read(GPIO_DATA_IN)) | 120 | if ((readl(GPIO_IN_POL) ^ readl(GPIO_DATA_IN)) |
121 | & (1 << pin)) | 121 | & (1 << pin)) |
122 | orion5x_setbits(GPIO_IN_POL, (1 << pin)); /* falling */ | 122 | orion5x_setbits(GPIO_IN_POL, (1 << pin)); /* falling */ |
123 | else | 123 | else |
@@ -149,8 +149,8 @@ static void orion5x_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
149 | 149 | ||
150 | BUG_ON(irq < IRQ_ORION5X_GPIO_0_7 || irq > IRQ_ORION5X_GPIO_24_31); | 150 | BUG_ON(irq < IRQ_ORION5X_GPIO_0_7 || irq > IRQ_ORION5X_GPIO_24_31); |
151 | offs = (irq - IRQ_ORION5X_GPIO_0_7) * 8; | 151 | offs = (irq - IRQ_ORION5X_GPIO_0_7) * 8; |
152 | cause = (orion5x_read(GPIO_DATA_IN) & orion5x_read(GPIO_LEVEL_MASK)) | | 152 | cause = (readl(GPIO_DATA_IN) & readl(GPIO_LEVEL_MASK)) | |
153 | (orion5x_read(GPIO_EDGE_CAUSE) & orion5x_read(GPIO_EDGE_MASK)); | 153 | (readl(GPIO_EDGE_CAUSE) & readl(GPIO_EDGE_MASK)); |
154 | 154 | ||
155 | for (pin = offs; pin < offs + 8; pin++) { | 155 | for (pin = offs; pin < offs + 8; pin++) { |
156 | if (cause & (1 << pin)) { | 156 | if (cause & (1 << pin)) { |
@@ -158,9 +158,9 @@ static void orion5x_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
158 | desc = irq_desc + irq; | 158 | desc = irq_desc + irq; |
159 | if ((desc->status & IRQ_TYPE_SENSE_MASK) == IRQT_BOTHEDGE) { | 159 | if ((desc->status & IRQ_TYPE_SENSE_MASK) == IRQT_BOTHEDGE) { |
160 | /* Swap polarity (race with GPIO line) */ | 160 | /* Swap polarity (race with GPIO line) */ |
161 | u32 polarity = orion5x_read(GPIO_IN_POL); | 161 | u32 polarity = readl(GPIO_IN_POL); |
162 | polarity ^= 1 << pin; | 162 | polarity ^= 1 << pin; |
163 | orion5x_write(GPIO_IN_POL, polarity); | 163 | writel(polarity, GPIO_IN_POL); |
164 | } | 164 | } |
165 | desc_handle_irq(irq, desc); | 165 | desc_handle_irq(irq, desc); |
166 | } | 166 | } |
@@ -175,9 +175,9 @@ static void __init orion5x_init_gpio_irq(void) | |||
175 | /* | 175 | /* |
176 | * Mask and clear GPIO IRQ interrupts | 176 | * Mask and clear GPIO IRQ interrupts |
177 | */ | 177 | */ |
178 | orion5x_write(GPIO_LEVEL_MASK, 0x0); | 178 | writel(0x0, GPIO_LEVEL_MASK); |
179 | orion5x_write(GPIO_EDGE_MASK, 0x0); | 179 | writel(0x0, GPIO_EDGE_MASK); |
180 | orion5x_write(GPIO_EDGE_CAUSE, 0x0); | 180 | writel(0x0, GPIO_EDGE_CAUSE); |
181 | 181 | ||
182 | /* | 182 | /* |
183 | * Register chained level handlers for GPIO IRQs by default. | 183 | * Register chained level handlers for GPIO IRQs by default. |
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c index 275a50046c1f..025ef63b1ddb 100644 --- a/arch/arm/mach-orion5x/pci.c +++ b/arch/arm/mach-orion5x/pci.c | |||
@@ -268,7 +268,7 @@ static DEFINE_SPINLOCK(orion5x_pci_lock); | |||
268 | 268 | ||
269 | static int orion5x_pci_local_bus_nr(void) | 269 | static int orion5x_pci_local_bus_nr(void) |
270 | { | 270 | { |
271 | u32 conf = orion5x_read(PCI_P2P_CONF); | 271 | u32 conf = readl(PCI_P2P_CONF); |
272 | return((conf & PCI_P2P_BUS_MASK) >> PCI_P2P_BUS_OFFS); | 272 | return((conf & PCI_P2P_BUS_MASK) >> PCI_P2P_BUS_OFFS); |
273 | } | 273 | } |
274 | 274 | ||
@@ -278,11 +278,11 @@ static int orion5x_pci_hw_rd_conf(int bus, int dev, u32 func, | |||
278 | unsigned long flags; | 278 | unsigned long flags; |
279 | spin_lock_irqsave(&orion5x_pci_lock, flags); | 279 | spin_lock_irqsave(&orion5x_pci_lock, flags); |
280 | 280 | ||
281 | orion5x_write(PCI_CONF_ADDR, PCI_CONF_BUS(bus) | | 281 | writel(PCI_CONF_BUS(bus) | |
282 | PCI_CONF_DEV(dev) | PCI_CONF_REG(where) | | 282 | PCI_CONF_DEV(dev) | PCI_CONF_REG(where) | |
283 | PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN); | 283 | PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN, PCI_CONF_ADDR); |
284 | 284 | ||
285 | *val = orion5x_read(PCI_CONF_DATA); | 285 | *val = readl(PCI_CONF_DATA); |
286 | 286 | ||
287 | if (size == 1) | 287 | if (size == 1) |
288 | *val = (*val >> (8*(where & 0x3))) & 0xff; | 288 | *val = (*val >> (8*(where & 0x3))) & 0xff; |
@@ -302,9 +302,9 @@ static int orion5x_pci_hw_wr_conf(int bus, int dev, u32 func, | |||
302 | 302 | ||
303 | spin_lock_irqsave(&orion5x_pci_lock, flags); | 303 | spin_lock_irqsave(&orion5x_pci_lock, flags); |
304 | 304 | ||
305 | orion5x_write(PCI_CONF_ADDR, PCI_CONF_BUS(bus) | | 305 | writel(PCI_CONF_BUS(bus) | |
306 | PCI_CONF_DEV(dev) | PCI_CONF_REG(where) | | 306 | PCI_CONF_DEV(dev) | PCI_CONF_REG(where) | |
307 | PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN); | 307 | PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN, PCI_CONF_ADDR); |
308 | 308 | ||
309 | if (size == 4) { | 309 | if (size == 4) { |
310 | __raw_writel(val, PCI_CONF_DATA); | 310 | __raw_writel(val, PCI_CONF_DATA); |
@@ -355,9 +355,9 @@ static struct pci_ops pci_ops = { | |||
355 | 355 | ||
356 | static void __init orion5x_pci_set_bus_nr(int nr) | 356 | static void __init orion5x_pci_set_bus_nr(int nr) |
357 | { | 357 | { |
358 | u32 p2p = orion5x_read(PCI_P2P_CONF); | 358 | u32 p2p = readl(PCI_P2P_CONF); |
359 | 359 | ||
360 | if (orion5x_read(PCI_MODE) & PCI_MODE_PCIX) { | 360 | if (readl(PCI_MODE) & PCI_MODE_PCIX) { |
361 | /* | 361 | /* |
362 | * PCI-X mode | 362 | * PCI-X mode |
363 | */ | 363 | */ |
@@ -374,7 +374,7 @@ static void __init orion5x_pci_set_bus_nr(int nr) | |||
374 | */ | 374 | */ |
375 | p2p &= ~PCI_P2P_BUS_MASK; | 375 | p2p &= ~PCI_P2P_BUS_MASK; |
376 | p2p |= (nr << PCI_P2P_BUS_OFFS); | 376 | p2p |= (nr << PCI_P2P_BUS_OFFS); |
377 | orion5x_write(PCI_P2P_CONF, p2p); | 377 | writel(p2p, PCI_P2P_CONF); |
378 | } | 378 | } |
379 | } | 379 | } |
380 | 380 | ||
@@ -401,7 +401,7 @@ static void __init orion5x_setup_pci_wins(struct mbus_dram_target_info *dram) | |||
401 | * First, disable windows. | 401 | * First, disable windows. |
402 | */ | 402 | */ |
403 | win_enable = 0xffffffff; | 403 | win_enable = 0xffffffff; |
404 | orion5x_write(PCI_BAR_ENABLE, win_enable); | 404 | writel(win_enable, PCI_BAR_ENABLE); |
405 | 405 | ||
406 | /* | 406 | /* |
407 | * Setup windows for DDR banks. | 407 | * Setup windows for DDR banks. |
@@ -427,10 +427,10 @@ static void __init orion5x_setup_pci_wins(struct mbus_dram_target_info *dram) | |||
427 | */ | 427 | */ |
428 | reg = PCI_CONF_REG_BAR_HI_CS(cs->cs_index); | 428 | reg = PCI_CONF_REG_BAR_HI_CS(cs->cs_index); |
429 | orion5x_pci_hw_wr_conf(bus, 0, func, reg, 4, 0); | 429 | orion5x_pci_hw_wr_conf(bus, 0, func, reg, 4, 0); |
430 | orion5x_write(PCI_BAR_SIZE_DDR_CS(cs->cs_index), | 430 | writel((cs->size - 1) & 0xfffff000, |
431 | (cs->size - 1) & 0xfffff000); | 431 | PCI_BAR_SIZE_DDR_CS(cs->cs_index)); |
432 | orion5x_write(PCI_BAR_REMAP_DDR_CS(cs->cs_index), | 432 | writel(cs->base & 0xfffff000, |
433 | cs->base & 0xfffff000); | 433 | PCI_BAR_REMAP_DDR_CS(cs->cs_index)); |
434 | 434 | ||
435 | /* | 435 | /* |
436 | * Enable decode window for this chip select. | 436 | * Enable decode window for this chip select. |
@@ -441,7 +441,7 @@ static void __init orion5x_setup_pci_wins(struct mbus_dram_target_info *dram) | |||
441 | /* | 441 | /* |
442 | * Re-enable decode windows. | 442 | * Re-enable decode windows. |
443 | */ | 443 | */ |
444 | orion5x_write(PCI_BAR_ENABLE, win_enable); | 444 | writel(win_enable, PCI_BAR_ENABLE); |
445 | 445 | ||
446 | /* | 446 | /* |
447 | * Disable automatic update of address remaping when writing to BARs. | 447 | * Disable automatic update of address remaping when writing to BARs. |