diff options
author | Marek Vasut <marek.vasut@gmail.com> | 2010-03-09 23:38:54 -0500 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2010-05-11 11:25:03 -0400 |
commit | 947fb57e3a6be2920423de42a503eea08b0c0763 (patch) | |
tree | c1ad1a634a598a877d68ea778cceccf6e1085ae9 /arch/arm/mach-pxa/vpac270.c | |
parent | 3d98f8816adafce2933599902fd9a5c0ccedd822 (diff) |
[ARM] pxa/vpac270: add ethernet support
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa/vpac270.c')
-rw-r--r-- | arch/arm/mach-pxa/vpac270.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c index b2bef615b390..56cc24575999 100644 --- a/arch/arm/mach-pxa/vpac270.c +++ b/arch/arm/mach-pxa/vpac270.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/mtd/mtd.h> | 21 | #include <linux/mtd/mtd.h> |
22 | #include <linux/mtd/partitions.h> | 22 | #include <linux/mtd/partitions.h> |
23 | #include <linux/mtd/physmap.h> | 23 | #include <linux/mtd/physmap.h> |
24 | #include <linux/dm9000.h> | ||
24 | 25 | ||
25 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
26 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
@@ -117,6 +118,9 @@ static unsigned long vpac270_pin_config[] __initdata = { | |||
117 | 118 | ||
118 | /* UDC */ | 119 | /* UDC */ |
119 | GPIO41_GPIO, | 120 | GPIO41_GPIO, |
121 | |||
122 | /* Ethernet */ | ||
123 | GPIO114_GPIO, /* IRQ */ | ||
120 | }; | 124 | }; |
121 | 125 | ||
122 | /****************************************************************************** | 126 | /****************************************************************************** |
@@ -309,6 +313,50 @@ static inline void vpac270_udc_init(void) {} | |||
309 | #endif | 313 | #endif |
310 | 314 | ||
311 | /****************************************************************************** | 315 | /****************************************************************************** |
316 | * Ethernet | ||
317 | ******************************************************************************/ | ||
318 | #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) | ||
319 | static struct resource vpac270_dm9000_resources[] = { | ||
320 | [0] = { | ||
321 | .start = PXA_CS2_PHYS + 0x300, | ||
322 | .end = PXA_CS2_PHYS + 0x303, | ||
323 | .flags = IORESOURCE_MEM, | ||
324 | }, | ||
325 | [1] = { | ||
326 | .start = PXA_CS2_PHYS + 0x304, | ||
327 | .end = PXA_CS2_PHYS + 0x343, | ||
328 | .flags = IORESOURCE_MEM, | ||
329 | }, | ||
330 | [2] = { | ||
331 | .start = IRQ_GPIO(GPIO114_VPAC270_ETH_IRQ), | ||
332 | .end = IRQ_GPIO(GPIO114_VPAC270_ETH_IRQ), | ||
333 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, | ||
334 | }, | ||
335 | }; | ||
336 | |||
337 | static struct dm9000_plat_data vpac270_dm9000_platdata = { | ||
338 | .flags = DM9000_PLATF_32BITONLY, | ||
339 | }; | ||
340 | |||
341 | static struct platform_device vpac270_dm9000_device = { | ||
342 | .name = "dm9000", | ||
343 | .id = -1, | ||
344 | .num_resources = ARRAY_SIZE(vpac270_dm9000_resources), | ||
345 | .resource = vpac270_dm9000_resources, | ||
346 | .dev = { | ||
347 | .platform_data = &vpac270_dm9000_platdata, | ||
348 | } | ||
349 | }; | ||
350 | |||
351 | static void __init vpac270_eth_init(void) | ||
352 | { | ||
353 | platform_device_register(&vpac270_dm9000_device); | ||
354 | } | ||
355 | #else | ||
356 | static inline void vpac270_eth_init(void) {} | ||
357 | #endif | ||
358 | |||
359 | /****************************************************************************** | ||
312 | * Framebuffer | 360 | * Framebuffer |
313 | ******************************************************************************/ | 361 | ******************************************************************************/ |
314 | #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) | 362 | #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) |
@@ -390,6 +438,7 @@ static void __init vpac270_init(void) | |||
390 | vpac270_keys_init(); | 438 | vpac270_keys_init(); |
391 | vpac270_uhc_init(); | 439 | vpac270_uhc_init(); |
392 | vpac270_udc_init(); | 440 | vpac270_udc_init(); |
441 | vpac270_eth_init(); | ||
393 | } | 442 | } |
394 | 443 | ||
395 | MACHINE_START(VPAC270, "Voipac PXA270") | 444 | MACHINE_START(VPAC270, "Voipac PXA270") |