diff options
Diffstat (limited to 'arch/arm/mach-orion5x/common.c')
-rw-r--r-- | arch/arm/mach-orion5x/common.c | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 9625ef5975d0..437065c25c9c 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/mv643xx_i2c.h> | 19 | #include <linux/mv643xx_i2c.h> |
20 | #include <linux/ata_platform.h> | 20 | #include <linux/ata_platform.h> |
21 | #include <linux/spi/orion_spi.h> | 21 | #include <linux/spi/orion_spi.h> |
22 | #include <net/dsa.h> | ||
22 | #include <asm/page.h> | 23 | #include <asm/page.h> |
23 | #include <asm/setup.h> | 24 | #include <asm/setup.h> |
24 | #include <asm/timex.h> | 25 | #include <asm/timex.h> |
@@ -198,6 +199,40 @@ void __init orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data) | |||
198 | 199 | ||
199 | 200 | ||
200 | /***************************************************************************** | 201 | /***************************************************************************** |
202 | * Ethernet switch | ||
203 | ****************************************************************************/ | ||
204 | static struct resource orion5x_switch_resources[] = { | ||
205 | { | ||
206 | .start = 0, | ||
207 | .end = 0, | ||
208 | .flags = IORESOURCE_IRQ, | ||
209 | }, | ||
210 | }; | ||
211 | |||
212 | static struct platform_device orion5x_switch_device = { | ||
213 | .name = "dsa", | ||
214 | .id = 0, | ||
215 | .num_resources = 0, | ||
216 | .resource = orion5x_switch_resources, | ||
217 | }; | ||
218 | |||
219 | void __init orion5x_eth_switch_init(struct dsa_platform_data *d, int irq) | ||
220 | { | ||
221 | if (irq != NO_IRQ) { | ||
222 | orion5x_switch_resources[0].start = irq; | ||
223 | orion5x_switch_resources[0].end = irq; | ||
224 | orion5x_switch_device.num_resources = 1; | ||
225 | } | ||
226 | |||
227 | d->mii_bus = &orion5x_eth_shared.dev; | ||
228 | d->netdev = &orion5x_eth.dev; | ||
229 | orion5x_switch_device.dev.platform_data = d; | ||
230 | |||
231 | platform_device_register(&orion5x_switch_device); | ||
232 | } | ||
233 | |||
234 | |||
235 | /***************************************************************************** | ||
201 | * I2C | 236 | * I2C |
202 | ****************************************************************************/ | 237 | ****************************************************************************/ |
203 | static struct mv64xxx_i2c_pdata orion5x_i2c_pdata = { | 238 | static struct mv64xxx_i2c_pdata orion5x_i2c_pdata = { |
@@ -275,7 +310,8 @@ void __init orion5x_sata_init(struct mv_sata_platform_data *sata_data) | |||
275 | * SPI | 310 | * SPI |
276 | ****************************************************************************/ | 311 | ****************************************************************************/ |
277 | static struct orion_spi_info orion5x_spi_plat_data = { | 312 | static struct orion_spi_info orion5x_spi_plat_data = { |
278 | .tclk = 0, | 313 | .tclk = 0, |
314 | .enable_clock_fix = 1, | ||
279 | }; | 315 | }; |
280 | 316 | ||
281 | static struct resource orion5x_spi_resources[] = { | 317 | static struct resource orion5x_spi_resources[] = { |