diff options
author | Andrew Lunn <andrew@lunn.ch> | 2011-05-15 07:32:40 -0400 |
---|---|---|
committer | Nicolas Pitre <nico@fluxnic.net> | 2011-05-16 14:46:17 -0400 |
commit | 5c60255149eece2a36ec9f5c99817b85f96fe8ec (patch) | |
tree | 471a8786818c2637f736e54b4f538a6692cc0578 | |
parent | e59347a1d15c0b1d9fdc510520f8fa78d7d19a5b (diff) |
ARM: orion: Rename some constants to macros to make code more identical
Changing eg 0xffffffff to DMA_BIT_MASK(32) etc allows easier
side by side comparision of identical code which can be consolidated.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
-rw-r--r-- | arch/arm/mach-dove/common.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/common.c | 28 | ||||
-rw-r--r-- | arch/arm/mach-loki/common.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-mv78xx0/common.c | 38 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/common.c | 38 |
5 files changed, 64 insertions, 62 deletions
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c index e06a88f1f81..30c95187978 100644 --- a/arch/arm/mach-dove/common.c +++ b/arch/arm/mach-dove/common.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/mv643xx_eth.h> | 19 | #include <linux/mv643xx_eth.h> |
20 | #include <linux/mv643xx_i2c.h> | 20 | #include <linux/mv643xx_i2c.h> |
21 | #include <linux/ata_platform.h> | 21 | #include <linux/ata_platform.h> |
22 | #include <linux/serial_8250.h> | ||
22 | #include <linux/spi/orion_spi.h> | 23 | #include <linux/spi/orion_spi.h> |
23 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
24 | #include <asm/page.h> | 25 | #include <asm/page.h> |
@@ -281,7 +282,7 @@ static struct resource dove_uart0_resources[] = { | |||
281 | 282 | ||
282 | static struct platform_device dove_uart0 = { | 283 | static struct platform_device dove_uart0 = { |
283 | .name = "serial8250", | 284 | .name = "serial8250", |
284 | .id = 0, | 285 | .id = PLAT8250_DEV_PLATFORM, |
285 | .dev = { | 286 | .dev = { |
286 | .platform_data = dove_uart0_data, | 287 | .platform_data = dove_uart0_data, |
287 | }, | 288 | }, |
@@ -324,7 +325,7 @@ static struct resource dove_uart1_resources[] = { | |||
324 | 325 | ||
325 | static struct platform_device dove_uart1 = { | 326 | static struct platform_device dove_uart1 = { |
326 | .name = "serial8250", | 327 | .name = "serial8250", |
327 | .id = 1, | 328 | .id = PLAT8250_DEV_PLATFORM1, |
328 | .dev = { | 329 | .dev = { |
329 | .platform_data = dove_uart1_data, | 330 | .platform_data = dove_uart1_data, |
330 | }, | 331 | }, |
@@ -367,7 +368,7 @@ static struct resource dove_uart2_resources[] = { | |||
367 | 368 | ||
368 | static struct platform_device dove_uart2 = { | 369 | static struct platform_device dove_uart2 = { |
369 | .name = "serial8250", | 370 | .name = "serial8250", |
370 | .id = 2, | 371 | .id = PLAT8250_DEV_PLATFORM2, |
371 | .dev = { | 372 | .dev = { |
372 | .platform_data = dove_uart2_data, | 373 | .platform_data = dove_uart2_data, |
373 | }, | 374 | }, |
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index 20e71df3e3b..4b89eed216e 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c | |||
@@ -79,7 +79,7 @@ static struct orion_ehci_data kirkwood_ehci_data = { | |||
79 | .phy_version = EHCI_PHY_NA, | 79 | .phy_version = EHCI_PHY_NA, |
80 | }; | 80 | }; |
81 | 81 | ||
82 | static u64 ehci_dmamask = 0xffffffffUL; | 82 | static u64 ehci_dmamask = DMA_BIT_MASK(32); |
83 | 83 | ||
84 | 84 | ||
85 | /***************************************************************************** | 85 | /***************************************************************************** |
@@ -88,7 +88,7 @@ static u64 ehci_dmamask = 0xffffffffUL; | |||
88 | static struct resource kirkwood_ehci_resources[] = { | 88 | static struct resource kirkwood_ehci_resources[] = { |
89 | { | 89 | { |
90 | .start = USB_PHYS_BASE, | 90 | .start = USB_PHYS_BASE, |
91 | .end = USB_PHYS_BASE + 0x0fff, | 91 | .end = USB_PHYS_BASE + SZ_4K - 1, |
92 | .flags = IORESOURCE_MEM, | 92 | .flags = IORESOURCE_MEM, |
93 | }, { | 93 | }, { |
94 | .start = IRQ_KIRKWOOD_USB, | 94 | .start = IRQ_KIRKWOOD_USB, |
@@ -102,7 +102,7 @@ static struct platform_device kirkwood_ehci = { | |||
102 | .id = 0, | 102 | .id = 0, |
103 | .dev = { | 103 | .dev = { |
104 | .dma_mask = &ehci_dmamask, | 104 | .dma_mask = &ehci_dmamask, |
105 | .coherent_dma_mask = 0xffffffff, | 105 | .coherent_dma_mask = DMA_BIT_MASK(32), |
106 | .platform_data = &kirkwood_ehci_data, | 106 | .platform_data = &kirkwood_ehci_data, |
107 | }, | 107 | }, |
108 | .resource = kirkwood_ehci_resources, | 108 | .resource = kirkwood_ehci_resources, |
@@ -127,7 +127,7 @@ static struct resource kirkwood_ge00_shared_resources[] = { | |||
127 | { | 127 | { |
128 | .name = "ge00 base", | 128 | .name = "ge00 base", |
129 | .start = GE00_PHYS_BASE + 0x2000, | 129 | .start = GE00_PHYS_BASE + 0x2000, |
130 | .end = GE00_PHYS_BASE + 0x3fff, | 130 | .end = GE00_PHYS_BASE + SZ_16K - 1, |
131 | .flags = IORESOURCE_MEM, | 131 | .flags = IORESOURCE_MEM, |
132 | }, { | 132 | }, { |
133 | .name = "ge00 err irq", | 133 | .name = "ge00 err irq", |
@@ -162,7 +162,7 @@ static struct platform_device kirkwood_ge00 = { | |||
162 | .num_resources = 1, | 162 | .num_resources = 1, |
163 | .resource = kirkwood_ge00_resources, | 163 | .resource = kirkwood_ge00_resources, |
164 | .dev = { | 164 | .dev = { |
165 | .coherent_dma_mask = 0xffffffff, | 165 | .coherent_dma_mask = DMA_BIT_MASK(32), |
166 | }, | 166 | }, |
167 | }; | 167 | }; |
168 | 168 | ||
@@ -189,7 +189,7 @@ static struct resource kirkwood_ge01_shared_resources[] = { | |||
189 | { | 189 | { |
190 | .name = "ge01 base", | 190 | .name = "ge01 base", |
191 | .start = GE01_PHYS_BASE + 0x2000, | 191 | .start = GE01_PHYS_BASE + 0x2000, |
192 | .end = GE01_PHYS_BASE + 0x3fff, | 192 | .end = GE01_PHYS_BASE + SZ_16K - 1, |
193 | .flags = IORESOURCE_MEM, | 193 | .flags = IORESOURCE_MEM, |
194 | }, { | 194 | }, { |
195 | .name = "ge01 err irq", | 195 | .name = "ge01 err irq", |
@@ -224,7 +224,7 @@ static struct platform_device kirkwood_ge01 = { | |||
224 | .num_resources = 1, | 224 | .num_resources = 1, |
225 | .resource = kirkwood_ge01_resources, | 225 | .resource = kirkwood_ge01_resources, |
226 | .dev = { | 226 | .dev = { |
227 | .coherent_dma_mask = 0xffffffff, | 227 | .coherent_dma_mask = DMA_BIT_MASK(32), |
228 | }, | 228 | }, |
229 | }; | 229 | }; |
230 | 230 | ||
@@ -358,7 +358,7 @@ static struct platform_device kirkwood_sata = { | |||
358 | .name = "sata_mv", | 358 | .name = "sata_mv", |
359 | .id = 0, | 359 | .id = 0, |
360 | .dev = { | 360 | .dev = { |
361 | .coherent_dma_mask = 0xffffffff, | 361 | .coherent_dma_mask = DMA_BIT_MASK(32), |
362 | }, | 362 | }, |
363 | .num_resources = ARRAY_SIZE(kirkwood_sata_resources), | 363 | .num_resources = ARRAY_SIZE(kirkwood_sata_resources), |
364 | .resource = kirkwood_sata_resources, | 364 | .resource = kirkwood_sata_resources, |
@@ -391,14 +391,14 @@ static struct resource mvsdio_resources[] = { | |||
391 | }, | 391 | }, |
392 | }; | 392 | }; |
393 | 393 | ||
394 | static u64 mvsdio_dmamask = 0xffffffffUL; | 394 | static u64 mvsdio_dmamask = DMA_BIT_MASK(32); |
395 | 395 | ||
396 | static struct platform_device kirkwood_sdio = { | 396 | static struct platform_device kirkwood_sdio = { |
397 | .name = "mvsdio", | 397 | .name = "mvsdio", |
398 | .id = -1, | 398 | .id = -1, |
399 | .dev = { | 399 | .dev = { |
400 | .dma_mask = &mvsdio_dmamask, | 400 | .dma_mask = &mvsdio_dmamask, |
401 | .coherent_dma_mask = 0xffffffff, | 401 | .coherent_dma_mask = DMA_BIT_MASK(32), |
402 | }, | 402 | }, |
403 | .num_resources = ARRAY_SIZE(mvsdio_resources), | 403 | .num_resources = ARRAY_SIZE(mvsdio_resources), |
404 | .resource = mvsdio_resources, | 404 | .resource = mvsdio_resources, |
@@ -518,7 +518,7 @@ static struct resource kirkwood_uart0_resources[] = { | |||
518 | 518 | ||
519 | static struct platform_device kirkwood_uart0 = { | 519 | static struct platform_device kirkwood_uart0 = { |
520 | .name = "serial8250", | 520 | .name = "serial8250", |
521 | .id = 0, | 521 | .id = PLAT8250_DEV_PLATFORM, |
522 | .dev = { | 522 | .dev = { |
523 | .platform_data = kirkwood_uart0_data, | 523 | .platform_data = kirkwood_uart0_data, |
524 | }, | 524 | }, |
@@ -562,7 +562,7 @@ static struct resource kirkwood_uart1_resources[] = { | |||
562 | 562 | ||
563 | static struct platform_device kirkwood_uart1 = { | 563 | static struct platform_device kirkwood_uart1 = { |
564 | .name = "serial8250", | 564 | .name = "serial8250", |
565 | .id = 1, | 565 | .id = PLAT8250_DEV_PLATFORM1, |
566 | .dev = { | 566 | .dev = { |
567 | .platform_data = kirkwood_uart1_data, | 567 | .platform_data = kirkwood_uart1_data, |
568 | }, | 568 | }, |
@@ -620,8 +620,6 @@ static struct mv_xor_platform_shared_data kirkwood_xor_shared_data = { | |||
620 | .dram = &kirkwood_mbus_dram_info, | 620 | .dram = &kirkwood_mbus_dram_info, |
621 | }; | 621 | }; |
622 | 622 | ||
623 | static u64 kirkwood_xor_dmamask = DMA_BIT_MASK(32); | ||
624 | |||
625 | 623 | ||
626 | /***************************************************************************** | 624 | /***************************************************************************** |
627 | * XOR0 | 625 | * XOR0 |
@@ -650,6 +648,8 @@ static struct platform_device kirkwood_xor0_shared = { | |||
650 | .resource = kirkwood_xor0_shared_resources, | 648 | .resource = kirkwood_xor0_shared_resources, |
651 | }; | 649 | }; |
652 | 650 | ||
651 | static u64 kirkwood_xor_dmamask = DMA_BIT_MASK(32); | ||
652 | |||
653 | static struct resource kirkwood_xor00_resources[] = { | 653 | static struct resource kirkwood_xor00_resources[] = { |
654 | [0] = { | 654 | [0] = { |
655 | .start = IRQ_KIRKWOOD_XOR_00, | 655 | .start = IRQ_KIRKWOOD_XOR_00, |
diff --git a/arch/arm/mach-loki/common.c b/arch/arm/mach-loki/common.c index e41e909cf8f..4ff4c62c3c0 100644 --- a/arch/arm/mach-loki/common.c +++ b/arch/arm/mach-loki/common.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/serial_8250.h> | 14 | #include <linux/serial_8250.h> |
15 | #include <linux/mbus.h> | 15 | #include <linux/mbus.h> |
16 | #include <linux/mv643xx_eth.h> | 16 | #include <linux/mv643xx_eth.h> |
17 | #include <linux/dma-mapping.h> | ||
17 | #include <asm/page.h> | 18 | #include <asm/page.h> |
18 | #include <asm/timex.h> | 19 | #include <asm/timex.h> |
19 | #include <asm/mach/map.h> | 20 | #include <asm/mach/map.h> |
@@ -54,7 +55,7 @@ static struct resource loki_ge0_shared_resources[] = { | |||
54 | { | 55 | { |
55 | .name = "ge0 base", | 56 | .name = "ge0 base", |
56 | .start = GE0_PHYS_BASE + 0x2000, | 57 | .start = GE0_PHYS_BASE + 0x2000, |
57 | .end = GE0_PHYS_BASE + 0x3fff, | 58 | .end = GE0_PHYS_BASE + SZ_16K - 1, |
58 | .flags = IORESOURCE_MEM, | 59 | .flags = IORESOURCE_MEM, |
59 | }, | 60 | }, |
60 | }; | 61 | }; |
@@ -84,7 +85,7 @@ static struct platform_device loki_ge0 = { | |||
84 | .num_resources = 1, | 85 | .num_resources = 1, |
85 | .resource = loki_ge0_resources, | 86 | .resource = loki_ge0_resources, |
86 | .dev = { | 87 | .dev = { |
87 | .coherent_dma_mask = 0xffffffff, | 88 | .coherent_dma_mask = DMA_BIT_MASK(32), |
88 | }, | 89 | }, |
89 | }; | 90 | }; |
90 | 91 | ||
@@ -111,7 +112,7 @@ static struct resource loki_ge1_shared_resources[] = { | |||
111 | { | 112 | { |
112 | .name = "ge1 base", | 113 | .name = "ge1 base", |
113 | .start = GE1_PHYS_BASE + 0x2000, | 114 | .start = GE1_PHYS_BASE + 0x2000, |
114 | .end = GE1_PHYS_BASE + 0x3fff, | 115 | .end = GE1_PHYS_BASE + SZ_16K - 1, |
115 | .flags = IORESOURCE_MEM, | 116 | .flags = IORESOURCE_MEM, |
116 | }, | 117 | }, |
117 | }; | 118 | }; |
@@ -141,7 +142,7 @@ static struct platform_device loki_ge1 = { | |||
141 | .num_resources = 1, | 142 | .num_resources = 1, |
142 | .resource = loki_ge1_resources, | 143 | .resource = loki_ge1_resources, |
143 | .dev = { | 144 | .dev = { |
144 | .coherent_dma_mask = 0xffffffff, | 145 | .coherent_dma_mask = DMA_BIT_MASK(32), |
145 | }, | 146 | }, |
146 | }; | 147 | }; |
147 | 148 | ||
@@ -187,7 +188,7 @@ static struct platform_device loki_sas = { | |||
187 | .name = "mvsas", | 188 | .name = "mvsas", |
188 | .id = 0, | 189 | .id = 0, |
189 | .dev = { | 190 | .dev = { |
190 | .coherent_dma_mask = 0xffffffff, | 191 | .coherent_dma_mask = DMA_BIT_MASK(32), |
191 | }, | 192 | }, |
192 | .num_resources = ARRAY_SIZE(loki_sas_resources), | 193 | .num_resources = ARRAY_SIZE(loki_sas_resources), |
193 | .resource = loki_sas_resources, | 194 | .resource = loki_sas_resources, |
@@ -230,7 +231,7 @@ static struct resource loki_uart0_resources[] = { | |||
230 | 231 | ||
231 | static struct platform_device loki_uart0 = { | 232 | static struct platform_device loki_uart0 = { |
232 | .name = "serial8250", | 233 | .name = "serial8250", |
233 | .id = 0, | 234 | .id = PLAT8250_DEV_PLATFORM, |
234 | .dev = { | 235 | .dev = { |
235 | .platform_data = loki_uart0_data, | 236 | .platform_data = loki_uart0_data, |
236 | }, | 237 | }, |
@@ -274,7 +275,7 @@ static struct resource loki_uart1_resources[] = { | |||
274 | 275 | ||
275 | static struct platform_device loki_uart1 = { | 276 | static struct platform_device loki_uart1 = { |
276 | .name = "serial8250", | 277 | .name = "serial8250", |
277 | .id = 1, | 278 | .id = PLAT8250_DEV_PLATFORM1, |
278 | .dev = { | 279 | .dev = { |
279 | .platform_data = loki_uart1_data, | 280 | .platform_data = loki_uart1_data, |
280 | }, | 281 | }, |
diff --git a/arch/arm/mach-mv78xx0/common.c b/arch/arm/mach-mv78xx0/common.c index 44fb4e55be0..c38250d1f07 100644 --- a/arch/arm/mach-mv78xx0/common.c +++ b/arch/arm/mach-mv78xx0/common.c | |||
@@ -173,7 +173,7 @@ static struct orion_ehci_data mv78xx0_ehci_data = { | |||
173 | .phy_version = EHCI_PHY_NA, | 173 | .phy_version = EHCI_PHY_NA, |
174 | }; | 174 | }; |
175 | 175 | ||
176 | static u64 ehci_dmamask = 0xffffffffUL; | 176 | static u64 ehci_dmamask = DMA_BIT_MASK(32); |
177 | 177 | ||
178 | 178 | ||
179 | /***************************************************************************** | 179 | /***************************************************************************** |
@@ -182,7 +182,7 @@ static u64 ehci_dmamask = 0xffffffffUL; | |||
182 | static struct resource mv78xx0_ehci0_resources[] = { | 182 | static struct resource mv78xx0_ehci0_resources[] = { |
183 | { | 183 | { |
184 | .start = USB0_PHYS_BASE, | 184 | .start = USB0_PHYS_BASE, |
185 | .end = USB0_PHYS_BASE + 0x0fff, | 185 | .end = USB0_PHYS_BASE + SZ_4K - 1, |
186 | .flags = IORESOURCE_MEM, | 186 | .flags = IORESOURCE_MEM, |
187 | }, { | 187 | }, { |
188 | .start = IRQ_MV78XX0_USB_0, | 188 | .start = IRQ_MV78XX0_USB_0, |
@@ -196,7 +196,7 @@ static struct platform_device mv78xx0_ehci0 = { | |||
196 | .id = 0, | 196 | .id = 0, |
197 | .dev = { | 197 | .dev = { |
198 | .dma_mask = &ehci_dmamask, | 198 | .dma_mask = &ehci_dmamask, |
199 | .coherent_dma_mask = 0xffffffff, | 199 | .coherent_dma_mask = DMA_BIT_MASK(32), |
200 | .platform_data = &mv78xx0_ehci_data, | 200 | .platform_data = &mv78xx0_ehci_data, |
201 | }, | 201 | }, |
202 | .resource = mv78xx0_ehci0_resources, | 202 | .resource = mv78xx0_ehci0_resources, |
@@ -215,7 +215,7 @@ void __init mv78xx0_ehci0_init(void) | |||
215 | static struct resource mv78xx0_ehci1_resources[] = { | 215 | static struct resource mv78xx0_ehci1_resources[] = { |
216 | { | 216 | { |
217 | .start = USB1_PHYS_BASE, | 217 | .start = USB1_PHYS_BASE, |
218 | .end = USB1_PHYS_BASE + 0x0fff, | 218 | .end = USB1_PHYS_BASE + SZ_4K - 1, |
219 | .flags = IORESOURCE_MEM, | 219 | .flags = IORESOURCE_MEM, |
220 | }, { | 220 | }, { |
221 | .start = IRQ_MV78XX0_USB_1, | 221 | .start = IRQ_MV78XX0_USB_1, |
@@ -229,7 +229,7 @@ static struct platform_device mv78xx0_ehci1 = { | |||
229 | .id = 1, | 229 | .id = 1, |
230 | .dev = { | 230 | .dev = { |
231 | .dma_mask = &ehci_dmamask, | 231 | .dma_mask = &ehci_dmamask, |
232 | .coherent_dma_mask = 0xffffffff, | 232 | .coherent_dma_mask = DMA_BIT_MASK(32), |
233 | .platform_data = &mv78xx0_ehci_data, | 233 | .platform_data = &mv78xx0_ehci_data, |
234 | }, | 234 | }, |
235 | .resource = mv78xx0_ehci1_resources, | 235 | .resource = mv78xx0_ehci1_resources, |
@@ -248,7 +248,7 @@ void __init mv78xx0_ehci1_init(void) | |||
248 | static struct resource mv78xx0_ehci2_resources[] = { | 248 | static struct resource mv78xx0_ehci2_resources[] = { |
249 | { | 249 | { |
250 | .start = USB2_PHYS_BASE, | 250 | .start = USB2_PHYS_BASE, |
251 | .end = USB2_PHYS_BASE + 0x0fff, | 251 | .end = USB2_PHYS_BASE + SZ_4K - 1, |
252 | .flags = IORESOURCE_MEM, | 252 | .flags = IORESOURCE_MEM, |
253 | }, { | 253 | }, { |
254 | .start = IRQ_MV78XX0_USB_2, | 254 | .start = IRQ_MV78XX0_USB_2, |
@@ -262,7 +262,7 @@ static struct platform_device mv78xx0_ehci2 = { | |||
262 | .id = 2, | 262 | .id = 2, |
263 | .dev = { | 263 | .dev = { |
264 | .dma_mask = &ehci_dmamask, | 264 | .dma_mask = &ehci_dmamask, |
265 | .coherent_dma_mask = 0xffffffff, | 265 | .coherent_dma_mask = DMA_BIT_MASK(32), |
266 | .platform_data = &mv78xx0_ehci_data, | 266 | .platform_data = &mv78xx0_ehci_data, |
267 | }, | 267 | }, |
268 | .resource = mv78xx0_ehci2_resources, | 268 | .resource = mv78xx0_ehci2_resources, |
@@ -287,7 +287,7 @@ static struct resource mv78xx0_ge00_shared_resources[] = { | |||
287 | { | 287 | { |
288 | .name = "ge00 base", | 288 | .name = "ge00 base", |
289 | .start = GE00_PHYS_BASE + 0x2000, | 289 | .start = GE00_PHYS_BASE + 0x2000, |
290 | .end = GE00_PHYS_BASE + 0x3fff, | 290 | .end = GE00_PHYS_BASE + SZ_16K - 1, |
291 | .flags = IORESOURCE_MEM, | 291 | .flags = IORESOURCE_MEM, |
292 | }, { | 292 | }, { |
293 | .name = "ge err irq", | 293 | .name = "ge err irq", |
@@ -322,7 +322,7 @@ static struct platform_device mv78xx0_ge00 = { | |||
322 | .num_resources = 1, | 322 | .num_resources = 1, |
323 | .resource = mv78xx0_ge00_resources, | 323 | .resource = mv78xx0_ge00_resources, |
324 | .dev = { | 324 | .dev = { |
325 | .coherent_dma_mask = 0xffffffff, | 325 | .coherent_dma_mask = DMA_BIT_MASK(32), |
326 | }, | 326 | }, |
327 | }; | 327 | }; |
328 | 328 | ||
@@ -349,7 +349,7 @@ static struct resource mv78xx0_ge01_shared_resources[] = { | |||
349 | { | 349 | { |
350 | .name = "ge01 base", | 350 | .name = "ge01 base", |
351 | .start = GE01_PHYS_BASE + 0x2000, | 351 | .start = GE01_PHYS_BASE + 0x2000, |
352 | .end = GE01_PHYS_BASE + 0x3fff, | 352 | .end = GE01_PHYS_BASE + SZ_16K - 1, |
353 | .flags = IORESOURCE_MEM, | 353 | .flags = IORESOURCE_MEM, |
354 | }, | 354 | }, |
355 | }; | 355 | }; |
@@ -379,7 +379,7 @@ static struct platform_device mv78xx0_ge01 = { | |||
379 | .num_resources = 1, | 379 | .num_resources = 1, |
380 | .resource = mv78xx0_ge01_resources, | 380 | .resource = mv78xx0_ge01_resources, |
381 | .dev = { | 381 | .dev = { |
382 | .coherent_dma_mask = 0xffffffff, | 382 | .coherent_dma_mask = DMA_BIT_MASK(32), |
383 | }, | 383 | }, |
384 | }; | 384 | }; |
385 | 385 | ||
@@ -406,7 +406,7 @@ static struct resource mv78xx0_ge10_shared_resources[] = { | |||
406 | { | 406 | { |
407 | .name = "ge10 base", | 407 | .name = "ge10 base", |
408 | .start = GE10_PHYS_BASE + 0x2000, | 408 | .start = GE10_PHYS_BASE + 0x2000, |
409 | .end = GE10_PHYS_BASE + 0x3fff, | 409 | .end = GE10_PHYS_BASE + SZ_16K - 1, |
410 | .flags = IORESOURCE_MEM, | 410 | .flags = IORESOURCE_MEM, |
411 | }, | 411 | }, |
412 | }; | 412 | }; |
@@ -436,7 +436,7 @@ static struct platform_device mv78xx0_ge10 = { | |||
436 | .num_resources = 1, | 436 | .num_resources = 1, |
437 | .resource = mv78xx0_ge10_resources, | 437 | .resource = mv78xx0_ge10_resources, |
438 | .dev = { | 438 | .dev = { |
439 | .coherent_dma_mask = 0xffffffff, | 439 | .coherent_dma_mask = DMA_BIT_MASK(32), |
440 | }, | 440 | }, |
441 | }; | 441 | }; |
442 | 442 | ||
@@ -476,7 +476,7 @@ static struct resource mv78xx0_ge11_shared_resources[] = { | |||
476 | { | 476 | { |
477 | .name = "ge11 base", | 477 | .name = "ge11 base", |
478 | .start = GE11_PHYS_BASE + 0x2000, | 478 | .start = GE11_PHYS_BASE + 0x2000, |
479 | .end = GE11_PHYS_BASE + 0x3fff, | 479 | .end = GE11_PHYS_BASE + SZ_16K - 1, |
480 | .flags = IORESOURCE_MEM, | 480 | .flags = IORESOURCE_MEM, |
481 | }, | 481 | }, |
482 | }; | 482 | }; |
@@ -506,7 +506,7 @@ static struct platform_device mv78xx0_ge11 = { | |||
506 | .num_resources = 1, | 506 | .num_resources = 1, |
507 | .resource = mv78xx0_ge11_resources, | 507 | .resource = mv78xx0_ge11_resources, |
508 | .dev = { | 508 | .dev = { |
509 | .coherent_dma_mask = 0xffffffff, | 509 | .coherent_dma_mask = DMA_BIT_MASK(32), |
510 | }, | 510 | }, |
511 | }; | 511 | }; |
512 | 512 | ||
@@ -625,7 +625,7 @@ static struct platform_device mv78xx0_sata = { | |||
625 | .name = "sata_mv", | 625 | .name = "sata_mv", |
626 | .id = 0, | 626 | .id = 0, |
627 | .dev = { | 627 | .dev = { |
628 | .coherent_dma_mask = 0xffffffff, | 628 | .coherent_dma_mask = DMA_BIT_MASK(32), |
629 | }, | 629 | }, |
630 | .num_resources = ARRAY_SIZE(mv78xx0_sata_resources), | 630 | .num_resources = ARRAY_SIZE(mv78xx0_sata_resources), |
631 | .resource = mv78xx0_sata_resources, | 631 | .resource = mv78xx0_sata_resources, |
@@ -669,7 +669,7 @@ static struct resource mv78xx0_uart0_resources[] = { | |||
669 | 669 | ||
670 | static struct platform_device mv78xx0_uart0 = { | 670 | static struct platform_device mv78xx0_uart0 = { |
671 | .name = "serial8250", | 671 | .name = "serial8250", |
672 | .id = 0, | 672 | .id = PLAT8250_DEV_PLATFORM, |
673 | .dev = { | 673 | .dev = { |
674 | .platform_data = mv78xx0_uart0_data, | 674 | .platform_data = mv78xx0_uart0_data, |
675 | }, | 675 | }, |
@@ -713,7 +713,7 @@ static struct resource mv78xx0_uart1_resources[] = { | |||
713 | 713 | ||
714 | static struct platform_device mv78xx0_uart1 = { | 714 | static struct platform_device mv78xx0_uart1 = { |
715 | .name = "serial8250", | 715 | .name = "serial8250", |
716 | .id = 1, | 716 | .id = PLAT8250_DEV_PLATFORM1, |
717 | .dev = { | 717 | .dev = { |
718 | .platform_data = mv78xx0_uart1_data, | 718 | .platform_data = mv78xx0_uart1_data, |
719 | }, | 719 | }, |
@@ -757,7 +757,7 @@ static struct resource mv78xx0_uart2_resources[] = { | |||
757 | 757 | ||
758 | static struct platform_device mv78xx0_uart2 = { | 758 | static struct platform_device mv78xx0_uart2 = { |
759 | .name = "serial8250", | 759 | .name = "serial8250", |
760 | .id = 2, | 760 | .id = PLAT8250_DEV_PLATFORM2, |
761 | .dev = { | 761 | .dev = { |
762 | .platform_data = mv78xx0_uart2_data, | 762 | .platform_data = mv78xx0_uart2_data, |
763 | }, | 763 | }, |
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 986c3bf4e6b..d281b1984e4 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -77,7 +77,7 @@ static struct orion_ehci_data orion5x_ehci_data = { | |||
77 | .phy_version = EHCI_PHY_ORION, | 77 | .phy_version = EHCI_PHY_ORION, |
78 | }; | 78 | }; |
79 | 79 | ||
80 | static u64 ehci_dmamask = 0xffffffffUL; | 80 | static u64 ehci_dmamask = DMA_BIT_MASK(32); |
81 | 81 | ||
82 | 82 | ||
83 | /***************************************************************************** | 83 | /***************************************************************************** |
@@ -100,7 +100,7 @@ static struct platform_device orion5x_ehci0 = { | |||
100 | .id = 0, | 100 | .id = 0, |
101 | .dev = { | 101 | .dev = { |
102 | .dma_mask = &ehci_dmamask, | 102 | .dma_mask = &ehci_dmamask, |
103 | .coherent_dma_mask = 0xffffffff, | 103 | .coherent_dma_mask = DMA_BIT_MASK(32), |
104 | .platform_data = &orion5x_ehci_data, | 104 | .platform_data = &orion5x_ehci_data, |
105 | }, | 105 | }, |
106 | .resource = orion5x_ehci0_resources, | 106 | .resource = orion5x_ehci0_resources, |
@@ -133,7 +133,7 @@ static struct platform_device orion5x_ehci1 = { | |||
133 | .id = 1, | 133 | .id = 1, |
134 | .dev = { | 134 | .dev = { |
135 | .dma_mask = &ehci_dmamask, | 135 | .dma_mask = &ehci_dmamask, |
136 | .coherent_dma_mask = 0xffffffff, | 136 | .coherent_dma_mask = DMA_BIT_MASK(32), |
137 | .platform_data = &orion5x_ehci_data, | 137 | .platform_data = &orion5x_ehci_data, |
138 | }, | 138 | }, |
139 | .resource = orion5x_ehci1_resources, | 139 | .resource = orion5x_ehci1_resources, |
@@ -147,16 +147,16 @@ void __init orion5x_ehci1_init(void) | |||
147 | 147 | ||
148 | 148 | ||
149 | /***************************************************************************** | 149 | /***************************************************************************** |
150 | * GigE | 150 | * GE00 |
151 | ****************************************************************************/ | 151 | ****************************************************************************/ |
152 | struct mv643xx_eth_shared_platform_data orion5x_eth_shared_data = { | 152 | struct mv643xx_eth_shared_platform_data orion5x_ge00_shared_data = { |
153 | .dram = &orion5x_mbus_dram_info, | 153 | .dram = &orion5x_mbus_dram_info, |
154 | }; | 154 | }; |
155 | 155 | ||
156 | static struct resource orion5x_eth_shared_resources[] = { | 156 | static struct resource orion5x_ge00_shared_resources[] = { |
157 | { | 157 | { |
158 | .start = ORION5X_ETH_PHYS_BASE + 0x2000, | 158 | .start = ORION5X_ETH_PHYS_BASE + 0x2000, |
159 | .end = ORION5X_ETH_PHYS_BASE + 0x3fff, | 159 | .end = ORION5X_ETH_PHYS_BASE + SZ_16K - 1, |
160 | .flags = IORESOURCE_MEM, | 160 | .flags = IORESOURCE_MEM, |
161 | }, { | 161 | }, { |
162 | .start = IRQ_ORION5X_ETH_ERR, | 162 | .start = IRQ_ORION5X_ETH_ERR, |
@@ -165,17 +165,17 @@ static struct resource orion5x_eth_shared_resources[] = { | |||
165 | }, | 165 | }, |
166 | }; | 166 | }; |
167 | 167 | ||
168 | static struct platform_device orion5x_eth_shared = { | 168 | static struct platform_device orion5x_ge00_shared = { |
169 | .name = MV643XX_ETH_SHARED_NAME, | 169 | .name = MV643XX_ETH_SHARED_NAME, |
170 | .id = 0, | 170 | .id = 0, |
171 | .dev = { | 171 | .dev = { |
172 | .platform_data = &orion5x_eth_shared_data, | 172 | .platform_data = &orion5x_ge00_shared_data, |
173 | }, | 173 | }, |
174 | .num_resources = ARRAY_SIZE(orion5x_eth_shared_resources), | 174 | .num_resources = ARRAY_SIZE(orion5x_ge00_shared_resources), |
175 | .resource = orion5x_eth_shared_resources, | 175 | .resource = orion5x_ge00_shared_resources, |
176 | }; | 176 | }; |
177 | 177 | ||
178 | static struct resource orion5x_eth_resources[] = { | 178 | static struct resource orion5x_ge00_resources[] = { |
179 | { | 179 | { |
180 | .name = "eth irq", | 180 | .name = "eth irq", |
181 | .start = IRQ_ORION5X_ETH_SUM, | 181 | .start = IRQ_ORION5X_ETH_SUM, |
@@ -188,18 +188,18 @@ static struct platform_device orion5x_eth = { | |||
188 | .name = MV643XX_ETH_NAME, | 188 | .name = MV643XX_ETH_NAME, |
189 | .id = 0, | 189 | .id = 0, |
190 | .num_resources = 1, | 190 | .num_resources = 1, |
191 | .resource = orion5x_eth_resources, | 191 | .resource = orion5x_ge00_resources, |
192 | .dev = { | 192 | .dev = { |
193 | .coherent_dma_mask = 0xffffffff, | 193 | .coherent_dma_mask = DMA_BIT_MASK(32), |
194 | }, | 194 | }, |
195 | }; | 195 | }; |
196 | 196 | ||
197 | void __init orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data) | 197 | void __init orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data) |
198 | { | 198 | { |
199 | eth_data->shared = &orion5x_eth_shared; | 199 | eth_data->shared = &orion5x_ge00_shared; |
200 | orion5x_eth.dev.platform_data = eth_data; | 200 | orion5x_eth.dev.platform_data = eth_data; |
201 | 201 | ||
202 | platform_device_register(&orion5x_eth_shared); | 202 | platform_device_register(&orion5x_ge00_shared); |
203 | platform_device_register(&orion5x_eth); | 203 | platform_device_register(&orion5x_eth); |
204 | } | 204 | } |
205 | 205 | ||
@@ -234,7 +234,7 @@ void __init orion5x_eth_switch_init(struct dsa_platform_data *d, int irq) | |||
234 | 234 | ||
235 | d->netdev = &orion5x_eth.dev; | 235 | d->netdev = &orion5x_eth.dev; |
236 | for (i = 0; i < d->nr_chips; i++) | 236 | for (i = 0; i < d->nr_chips; i++) |
237 | d->chip[i].mii_bus = &orion5x_eth_shared.dev; | 237 | d->chip[i].mii_bus = &orion5x_ge00_shared.dev; |
238 | orion5x_switch_device.dev.platform_data = d; | 238 | orion5x_switch_device.dev.platform_data = d; |
239 | 239 | ||
240 | platform_device_register(&orion5x_switch_device); | 240 | platform_device_register(&orion5x_switch_device); |
@@ -299,7 +299,7 @@ static struct platform_device orion5x_sata = { | |||
299 | .name = "sata_mv", | 299 | .name = "sata_mv", |
300 | .id = 0, | 300 | .id = 0, |
301 | .dev = { | 301 | .dev = { |
302 | .coherent_dma_mask = 0xffffffff, | 302 | .coherent_dma_mask = DMA_BIT_MASK(32), |
303 | }, | 303 | }, |
304 | .num_resources = ARRAY_SIZE(orion5x_sata_resources), | 304 | .num_resources = ARRAY_SIZE(orion5x_sata_resources), |
305 | .resource = orion5x_sata_resources, | 305 | .resource = orion5x_sata_resources, |
@@ -685,7 +685,7 @@ void __init orion5x_init(void) | |||
685 | orion5x_id(&dev, &rev, &dev_name); | 685 | orion5x_id(&dev, &rev, &dev_name); |
686 | printk(KERN_INFO "Orion ID: %s. TCLK=%d.\n", dev_name, orion5x_tclk); | 686 | printk(KERN_INFO "Orion ID: %s. TCLK=%d.\n", dev_name, orion5x_tclk); |
687 | 687 | ||
688 | orion5x_eth_shared_data.t_clk = orion5x_tclk; | 688 | orion5x_ge00_shared_data.t_clk = orion5x_tclk; |
689 | orion5x_spi_plat_data.tclk = orion5x_tclk; | 689 | orion5x_spi_plat_data.tclk = orion5x_tclk; |
690 | orion5x_uart0_data[0].uartclk = orion5x_tclk; | 690 | orion5x_uart0_data[0].uartclk = orion5x_tclk; |
691 | orion5x_uart1_data[0].uartclk = orion5x_tclk; | 691 | orion5x_uart1_data[0].uartclk = orion5x_tclk; |