summaryrefslogtreecommitdiff
path: root/arch/arm/mach-kirkwood/common.c
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2011-05-15 15:32:40 +0400
committerNicolas Pitre <nico@fluxnic.net>2011-05-16 22:46:17 +0400
commit5c60255149eece2a36ec9f5c99817b85f96fe8ec (patch)
tree471a8786818c2637f736e54b4f538a6692cc0578 /arch/arm/mach-kirkwood/common.c
parente59347a1d15c0b1d9fdc510520f8fa78d7d19a5b (diff)
downloadlinux-5c60255149eece2a36ec9f5c99817b85f96fe8ec.tar.xz
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-kirkwood/common.c')
-rw-r--r--arch/arm/mach-kirkwood/common.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
index 20e71df3e3bb..4b89eed216e7 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 = {
.phy_version = EHCI_PHY_NA,
};
-static u64 ehci_dmamask = 0xffffffffUL;
+static u64 ehci_dmamask = DMA_BIT_MASK(32);
/*****************************************************************************
@@ -88,7 +88,7 @@ static u64 ehci_dmamask = 0xffffffffUL;
static struct resource kirkwood_ehci_resources[] = {
{
.start = USB_PHYS_BASE,
- .end = USB_PHYS_BASE + 0x0fff,
+ .end = USB_PHYS_BASE + SZ_4K - 1,
.flags = IORESOURCE_MEM,
}, {
.start = IRQ_KIRKWOOD_USB,
@@ -102,7 +102,7 @@ static struct platform_device kirkwood_ehci = {
.id = 0,
.dev = {
.dma_mask = &ehci_dmamask,
- .coherent_dma_mask = 0xffffffff,
+ .coherent_dma_mask = DMA_BIT_MASK(32),
.platform_data = &kirkwood_ehci_data,
},
.resource = kirkwood_ehci_resources,
@@ -127,7 +127,7 @@ static struct resource kirkwood_ge00_shared_resources[] = {
{
.name = "ge00 base",
.start = GE00_PHYS_BASE + 0x2000,
- .end = GE00_PHYS_BASE + 0x3fff,
+ .end = GE00_PHYS_BASE + SZ_16K - 1,
.flags = IORESOURCE_MEM,
}, {
.name = "ge00 err irq",
@@ -162,7 +162,7 @@ static struct platform_device kirkwood_ge00 = {
.num_resources = 1,
.resource = kirkwood_ge00_resources,
.dev = {
- .coherent_dma_mask = 0xffffffff,
+ .coherent_dma_mask = DMA_BIT_MASK(32),
},
};
@@ -189,7 +189,7 @@ static struct resource kirkwood_ge01_shared_resources[] = {
{
.name = "ge01 base",
.start = GE01_PHYS_BASE + 0x2000,
- .end = GE01_PHYS_BASE + 0x3fff,
+ .end = GE01_PHYS_BASE + SZ_16K - 1,
.flags = IORESOURCE_MEM,
}, {
.name = "ge01 err irq",
@@ -224,7 +224,7 @@ static struct platform_device kirkwood_ge01 = {
.num_resources = 1,
.resource = kirkwood_ge01_resources,
.dev = {
- .coherent_dma_mask = 0xffffffff,
+ .coherent_dma_mask = DMA_BIT_MASK(32),
},
};
@@ -358,7 +358,7 @@ static struct platform_device kirkwood_sata = {
.name = "sata_mv",
.id = 0,
.dev = {
- .coherent_dma_mask = 0xffffffff,
+ .coherent_dma_mask = DMA_BIT_MASK(32),
},
.num_resources = ARRAY_SIZE(kirkwood_sata_resources),
.resource = kirkwood_sata_resources,
@@ -391,14 +391,14 @@ static struct resource mvsdio_resources[] = {
},
};
-static u64 mvsdio_dmamask = 0xffffffffUL;
+static u64 mvsdio_dmamask = DMA_BIT_MASK(32);
static struct platform_device kirkwood_sdio = {
.name = "mvsdio",
.id = -1,
.dev = {
.dma_mask = &mvsdio_dmamask,
- .coherent_dma_mask = 0xffffffff,
+ .coherent_dma_mask = DMA_BIT_MASK(32),
},
.num_resources = ARRAY_SIZE(mvsdio_resources),
.resource = mvsdio_resources,
@@ -518,7 +518,7 @@ static struct resource kirkwood_uart0_resources[] = {
static struct platform_device kirkwood_uart0 = {
.name = "serial8250",
- .id = 0,
+ .id = PLAT8250_DEV_PLATFORM,
.dev = {
.platform_data = kirkwood_uart0_data,
},
@@ -562,7 +562,7 @@ static struct resource kirkwood_uart1_resources[] = {
static struct platform_device kirkwood_uart1 = {
.name = "serial8250",
- .id = 1,
+ .id = PLAT8250_DEV_PLATFORM1,
.dev = {
.platform_data = kirkwood_uart1_data,
},
@@ -620,8 +620,6 @@ static struct mv_xor_platform_shared_data kirkwood_xor_shared_data = {
.dram = &kirkwood_mbus_dram_info,
};
-static u64 kirkwood_xor_dmamask = DMA_BIT_MASK(32);
-
/*****************************************************************************
* XOR0
@@ -650,6 +648,8 @@ static struct platform_device kirkwood_xor0_shared = {
.resource = kirkwood_xor0_shared_resources,
};
+static u64 kirkwood_xor_dmamask = DMA_BIT_MASK(32);
+
static struct resource kirkwood_xor00_resources[] = {
[0] = {
.start = IRQ_KIRKWOOD_XOR_00,