aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-kirkwood/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-kirkwood/common.c')
-rw-r--r--arch/arm/mach-kirkwood/common.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
index 85cad05d8c5b..0bb1fbd84ccb 100644
--- a/arch/arm/mach-kirkwood/common.c
+++ b/arch/arm/mach-kirkwood/common.c
@@ -16,6 +16,7 @@
16#include <linux/mv643xx_eth.h> 16#include <linux/mv643xx_eth.h>
17#include <linux/ata_platform.h> 17#include <linux/ata_platform.h>
18#include <linux/spi/orion_spi.h> 18#include <linux/spi/orion_spi.h>
19#include <net/dsa.h>
19#include <asm/page.h> 20#include <asm/page.h>
20#include <asm/timex.h> 21#include <asm/timex.h>
21#include <asm/mach/map.h> 22#include <asm/mach/map.h>
@@ -152,6 +153,40 @@ void __init kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data)
152 153
153 154
154/***************************************************************************** 155/*****************************************************************************
156 * Ethernet switch
157 ****************************************************************************/
158static struct resource kirkwood_switch_resources[] = {
159 {
160 .start = 0,
161 .end = 0,
162 .flags = IORESOURCE_IRQ,
163 },
164};
165
166static struct platform_device kirkwood_switch_device = {
167 .name = "dsa",
168 .id = 0,
169 .num_resources = 0,
170 .resource = kirkwood_switch_resources,
171};
172
173void __init kirkwood_ge00_switch_init(struct dsa_platform_data *d, int irq)
174{
175 if (irq != NO_IRQ) {
176 kirkwood_switch_resources[0].start = irq;
177 kirkwood_switch_resources[0].end = irq;
178 kirkwood_switch_device.num_resources = 1;
179 }
180
181 d->mii_bus = &kirkwood_ge00_shared.dev;
182 d->netdev = &kirkwood_ge00.dev;
183 kirkwood_switch_device.dev.platform_data = d;
184
185 platform_device_register(&kirkwood_switch_device);
186}
187
188
189/*****************************************************************************
155 * SoC RTC 190 * SoC RTC
156 ****************************************************************************/ 191 ****************************************************************************/
157static struct resource kirkwood_rtc_resource = { 192static struct resource kirkwood_rtc_resource = {