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.c59
1 files changed, 59 insertions, 0 deletions
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
index 0bb1fbd84ccb..7b8ef97fb501 100644
--- a/arch/arm/mach-kirkwood/common.c
+++ b/arch/arm/mach-kirkwood/common.c
@@ -57,6 +57,7 @@ void __init kirkwood_map_io(void)
57 ****************************************************************************/ 57 ****************************************************************************/
58static struct orion_ehci_data kirkwood_ehci_data = { 58static struct orion_ehci_data kirkwood_ehci_data = {
59 .dram = &kirkwood_mbus_dram_info, 59 .dram = &kirkwood_mbus_dram_info,
60 .phy_version = EHCI_PHY_NA,
60}; 61};
61 62
62static u64 ehci_dmamask = 0xffffffffUL; 63static u64 ehci_dmamask = 0xffffffffUL;
@@ -153,6 +154,64 @@ void __init kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data)
153 154
154 155
155/***************************************************************************** 156/*****************************************************************************
157 * GE01
158 ****************************************************************************/
159struct mv643xx_eth_shared_platform_data kirkwood_ge01_shared_data = {
160 .dram = &kirkwood_mbus_dram_info,
161 .shared_smi = &kirkwood_ge00_shared,
162};
163
164static struct resource kirkwood_ge01_shared_resources[] = {
165 {
166 .name = "ge01 base",
167 .start = GE01_PHYS_BASE + 0x2000,
168 .end = GE01_PHYS_BASE + 0x3fff,
169 .flags = IORESOURCE_MEM,
170 }, {
171 .name = "ge01 err irq",
172 .start = IRQ_KIRKWOOD_GE01_ERR,
173 .end = IRQ_KIRKWOOD_GE01_ERR,
174 .flags = IORESOURCE_IRQ,
175 },
176};
177
178static struct platform_device kirkwood_ge01_shared = {
179 .name = MV643XX_ETH_SHARED_NAME,
180 .id = 1,
181 .dev = {
182 .platform_data = &kirkwood_ge01_shared_data,
183 },
184 .num_resources = ARRAY_SIZE(kirkwood_ge01_shared_resources),
185 .resource = kirkwood_ge01_shared_resources,
186};
187
188static struct resource kirkwood_ge01_resources[] = {
189 {
190 .name = "ge01 irq",
191 .start = IRQ_KIRKWOOD_GE01_SUM,
192 .end = IRQ_KIRKWOOD_GE01_SUM,
193 .flags = IORESOURCE_IRQ,
194 },
195};
196
197static struct platform_device kirkwood_ge01 = {
198 .name = MV643XX_ETH_NAME,
199 .id = 1,
200 .num_resources = 1,
201 .resource = kirkwood_ge01_resources,
202};
203
204void __init kirkwood_ge01_init(struct mv643xx_eth_platform_data *eth_data)
205{
206 eth_data->shared = &kirkwood_ge01_shared;
207 kirkwood_ge01.dev.platform_data = eth_data;
208
209 platform_device_register(&kirkwood_ge01_shared);
210 platform_device_register(&kirkwood_ge01);
211}
212
213
214/*****************************************************************************
156 * Ethernet switch 215 * Ethernet switch
157 ****************************************************************************/ 216 ****************************************************************************/
158static struct resource kirkwood_switch_resources[] = { 217static struct resource kirkwood_switch_resources[] = {