diff options
author | Andrew Lunn <andrew@lunn.ch> | 2011-05-15 07:32:44 -0400 |
---|---|---|
committer | Nicolas Pitre <nico@fluxnic.net> | 2011-05-16 15:06:01 -0400 |
commit | 7e3819d820c9aa3536d15fe7310c054bef1f5f04 (patch) | |
tree | a65cf874aceae43813e5c03f587e8f5bfaaf32ad /arch/arm/mach-dove | |
parent | 4748058c5cbf70b3adfa37204c047fcb29f335c0 (diff) |
ARM: orion: Consolidate ethernet platform data
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Diffstat (limited to 'arch/arm/mach-dove')
-rw-r--r-- | arch/arm/mach-dove/common.c | 53 |
1 files changed, 3 insertions, 50 deletions
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c index 8a414cb71a2..1d878ce69d9 100644 --- a/arch/arm/mach-dove/common.c +++ b/arch/arm/mach-dove/common.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/serial_8250.h> | 16 | #include <linux/serial_8250.h> |
17 | #include <linux/clk.h> | 17 | #include <linux/clk.h> |
18 | #include <linux/mbus.h> | 18 | #include <linux/mbus.h> |
19 | #include <linux/mv643xx_eth.h> | ||
20 | #include <linux/mv643xx_i2c.h> | 19 | #include <linux/mv643xx_i2c.h> |
21 | #include <linux/ata_platform.h> | 20 | #include <linux/ata_platform.h> |
22 | #include <linux/serial_8250.h> | 21 | #include <linux/serial_8250.h> |
@@ -150,56 +149,11 @@ void __init dove_ehci1_init(void) | |||
150 | /***************************************************************************** | 149 | /***************************************************************************** |
151 | * GE00 | 150 | * GE00 |
152 | ****************************************************************************/ | 151 | ****************************************************************************/ |
153 | struct mv643xx_eth_shared_platform_data dove_ge00_shared_data = { | ||
154 | .t_clk = 0, | ||
155 | .dram = &dove_mbus_dram_info, | ||
156 | }; | ||
157 | |||
158 | static struct resource dove_ge00_shared_resources[] = { | ||
159 | { | ||
160 | .name = "ge00 base", | ||
161 | .start = DOVE_GE00_PHYS_BASE + 0x2000, | ||
162 | .end = DOVE_GE00_PHYS_BASE + SZ_16K - 1, | ||
163 | .flags = IORESOURCE_MEM, | ||
164 | }, | ||
165 | }; | ||
166 | |||
167 | static struct platform_device dove_ge00_shared = { | ||
168 | .name = MV643XX_ETH_SHARED_NAME, | ||
169 | .id = 0, | ||
170 | .dev = { | ||
171 | .platform_data = &dove_ge00_shared_data, | ||
172 | }, | ||
173 | .num_resources = 1, | ||
174 | .resource = dove_ge00_shared_resources, | ||
175 | }; | ||
176 | |||
177 | static struct resource dove_ge00_resources[] = { | ||
178 | { | ||
179 | .name = "ge00 irq", | ||
180 | .start = IRQ_DOVE_GE00_SUM, | ||
181 | .end = IRQ_DOVE_GE00_SUM, | ||
182 | .flags = IORESOURCE_IRQ, | ||
183 | }, | ||
184 | }; | ||
185 | |||
186 | static struct platform_device dove_ge00 = { | ||
187 | .name = MV643XX_ETH_NAME, | ||
188 | .id = 0, | ||
189 | .num_resources = 1, | ||
190 | .resource = dove_ge00_resources, | ||
191 | .dev = { | ||
192 | .coherent_dma_mask = 0xffffffff, | ||
193 | }, | ||
194 | }; | ||
195 | |||
196 | void __init dove_ge00_init(struct mv643xx_eth_platform_data *eth_data) | 152 | void __init dove_ge00_init(struct mv643xx_eth_platform_data *eth_data) |
197 | { | 153 | { |
198 | eth_data->shared = &dove_ge00_shared; | 154 | orion_ge00_init(eth_data, &dove_mbus_dram_info, |
199 | dove_ge00.dev.platform_data = eth_data; | 155 | DOVE_GE00_PHYS_BASE, IRQ_DOVE_GE00_SUM, |
200 | 156 | 0, get_tclk()); | |
201 | platform_device_register(&dove_ge00_shared); | ||
202 | platform_device_register(&dove_ge00); | ||
203 | } | 157 | } |
204 | 158 | ||
205 | /***************************************************************************** | 159 | /***************************************************************************** |
@@ -690,7 +644,6 @@ void __init dove_init(void) | |||
690 | #endif | 644 | #endif |
691 | dove_setup_cpu_mbus(); | 645 | dove_setup_cpu_mbus(); |
692 | 646 | ||
693 | dove_ge00_shared_data.t_clk = tclk; | ||
694 | dove_spi0_data.tclk = tclk; | 647 | dove_spi0_data.tclk = tclk; |
695 | dove_spi1_data.tclk = tclk; | 648 | dove_spi1_data.tclk = tclk; |
696 | 649 | ||