summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2010-03-10 05:38:54 +0100
committerEric Miao <eric.y.miao@gmail.com>2010-05-11 17:25:03 +0200
commit947fb57e3a6be2920423de42a503eea08b0c0763 (patch)
treec1ad1a634a598a877d68ea778cceccf6e1085ae9 /arch/arm/mach-pxa
parent3d98f8816adafce2933599902fd9a5c0ccedd822 (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')
-rw-r--r--arch/arm/mach-pxa/include/mach/vpac270.h3
-rw-r--r--arch/arm/mach-pxa/vpac270.c49
2 files changed, 52 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/include/mach/vpac270.h b/arch/arm/mach-pxa/include/mach/vpac270.h
index 9f7b460d99c..b90b380ddab 100644
--- a/arch/arm/mach-pxa/include/mach/vpac270.h
+++ b/arch/arm/mach-pxa/include/mach/vpac270.h
@@ -32,4 +32,7 @@
#define GPIO16_VPAC270_CF_RESET 16
#define GPIO41_VPAC270_UDC_DETECT 41
+
+#define GPIO114_VPAC270_ETH_IRQ 114
+
#endif
diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c
index b2bef615b39..56cc2457599 100644
--- a/arch/arm/mach-pxa/vpac270.c
+++ b/arch/arm/mach-pxa/vpac270.c
@@ -21,6 +21,7 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>
+#include <linux/dm9000.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -117,6 +118,9 @@ static unsigned long vpac270_pin_config[] __initdata = {
/* UDC */
GPIO41_GPIO,
+
+ /* Ethernet */
+ GPIO114_GPIO, /* IRQ */
};
/******************************************************************************
@@ -309,6 +313,50 @@ static inline void vpac270_udc_init(void) {}
#endif
/******************************************************************************
+ * Ethernet
+ ******************************************************************************/
+#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
+static struct resource vpac270_dm9000_resources[] = {
+ [0] = {
+ .start = PXA_CS2_PHYS + 0x300,
+ .end = PXA_CS2_PHYS + 0x303,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = PXA_CS2_PHYS + 0x304,
+ .end = PXA_CS2_PHYS + 0x343,
+ .flags = IORESOURCE_MEM,
+ },
+ [2] = {
+ .start = IRQ_GPIO(GPIO114_VPAC270_ETH_IRQ),
+ .end = IRQ_GPIO(GPIO114_VPAC270_ETH_IRQ),
+ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
+ },
+};
+
+static struct dm9000_plat_data vpac270_dm9000_platdata = {
+ .flags = DM9000_PLATF_32BITONLY,
+};
+
+static struct platform_device vpac270_dm9000_device = {
+ .name = "dm9000",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(vpac270_dm9000_resources),
+ .resource = vpac270_dm9000_resources,
+ .dev = {
+ .platform_data = &vpac270_dm9000_platdata,
+ }
+};
+
+static void __init vpac270_eth_init(void)
+{
+ platform_device_register(&vpac270_dm9000_device);
+}
+#else
+static inline void vpac270_eth_init(void) {}
+#endif
+
+/******************************************************************************
* Framebuffer
******************************************************************************/
#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
@@ -390,6 +438,7 @@ static void __init vpac270_init(void)
vpac270_keys_init();
vpac270_uhc_init();
vpac270_udc_init();
+ vpac270_eth_init();
}
MACHINE_START(VPAC270, "Voipac PXA270")