diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2008-09-25 10:23:48 -0400 |
---|---|---|
committer | Nicolas Pitre <nico@cam.org> | 2008-10-19 14:29:05 -0400 |
commit | dcf1cece143d95b48676cf607a21ee0805daa55a (patch) | |
tree | 4527b626549892cd882fb700dbaddb60c00e044f /arch/arm/mach-orion5x/common.c | |
parent | 04185fc67c0f8ec84ce9dd9ef33c9825b41453c6 (diff) |
[ARM] Orion: instantiate the dsa switch driver
This adds DSA switch instantiation hooks to the orion5x and the
kirkwood ARM SoC platform code, and instantiates the DSA switch
driver on the 88F5181L FXO RD, the 88F5181L GE RD, the 6183 AP GE
RD, the Linksys WRT350n v2, and the 88F6281 RD boards.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Tested-by: Nicolas Pitre <nico@marvell.com>
Tested-by: Peter van Valderen <linux@ddcrew.com>
Tested-by: Dirk Teurlings <dirk@upexia.nl>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Diffstat (limited to 'arch/arm/mach-orion5x/common.c')
-rw-r--r-- | arch/arm/mach-orion5x/common.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 9625ef5975d0..a2f917e0a307 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 = { |