aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mv78xx0/common.c
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2011-05-15 07:32:40 -0400
committerNicolas Pitre <nico@fluxnic.net>2011-05-16 14:46:17 -0400
commit5c60255149eece2a36ec9f5c99817b85f96fe8ec (patch)
tree471a8786818c2637f736e54b4f538a6692cc0578 /arch/arm/mach-mv78xx0/common.c
parente59347a1d15c0b1d9fdc510520f8fa78d7d19a5b (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>
Diffstat (limited to 'arch/arm/mach-mv78xx0/common.c')
-rw-r--r--arch/arm/mach-mv78xx0/common.c38
1 files changed, 19 insertions, 19 deletions
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
176static u64 ehci_dmamask = 0xffffffffUL; 176static u64 ehci_dmamask = DMA_BIT_MASK(32);
177 177
178 178
179/***************************************************************************** 179/*****************************************************************************
@@ -182,7 +182,7 @@ static u64 ehci_dmamask = 0xffffffffUL;
182static struct resource mv78xx0_ehci0_resources[] = { 182static 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)
215static struct resource mv78xx0_ehci1_resources[] = { 215static 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)
248static struct resource mv78xx0_ehci2_resources[] = { 248static 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
670static struct platform_device mv78xx0_uart0 = { 670static 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
714static struct platform_device mv78xx0_uart1 = { 714static 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
758static struct platform_device mv78xx0_uart2 = { 758static 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 },