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 /arch/arm/mach-orion5x | |
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>
Diffstat (limited to 'arch/arm/mach-orion5x')
-rw-r--r-- | arch/arm/mach-orion5x/common.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 986c3bf4e6b8..d281b1984e4a 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; |