diff options
author | Guennadi Liakhovetski <lg@denx.de> | 2008-11-11 09:12:00 -0500 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2008-12-16 08:57:55 -0500 |
commit | ba54b95899838610c8c23fb7ab88831016b81fb3 (patch) | |
tree | cc24563e851b9ee9742f10bcc80839a96b05ef35 | |
parent | 3620c0dccfd35cd39324508d8c962d10f9a44ead (diff) |
[ARM] pcm037: add support for the on-board LAN9217 network controller
smc911x now also supports LAN921{5,7,8} network controllers.
Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | arch/arm/mach-mx3/pcm037.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/pcm037.c b/arch/arm/mach-mx3/pcm037.c index 8cd1fdf1897c..1707096d3623 100644 --- a/arch/arm/mach-mx3/pcm037.c +++ b/arch/arm/mach-mx3/pcm037.c | |||
@@ -22,6 +22,9 @@ | |||
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/mtd/physmap.h> | 23 | #include <linux/mtd/physmap.h> |
24 | #include <linux/memory.h> | 24 | #include <linux/memory.h> |
25 | #include <linux/gpio.h> | ||
26 | #include <linux/smc911x.h> | ||
27 | #include <linux/interrupt.h> | ||
25 | 28 | ||
26 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
27 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
@@ -59,8 +62,37 @@ static struct imxuart_platform_data uart_pdata = { | |||
59 | .flags = IMXUART_HAVE_RTSCTS, | 62 | .flags = IMXUART_HAVE_RTSCTS, |
60 | }; | 63 | }; |
61 | 64 | ||
65 | static struct resource smc911x_resources[] = { | ||
66 | [0] = { | ||
67 | .start = CS1_BASE_ADDR + 0x300, | ||
68 | .end = CS1_BASE_ADDR + 0x300 + SZ_64K - 1, | ||
69 | .flags = IORESOURCE_MEM, | ||
70 | }, | ||
71 | [1] = { | ||
72 | .start = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), | ||
73 | .end = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), | ||
74 | .flags = IORESOURCE_IRQ, | ||
75 | }, | ||
76 | }; | ||
77 | |||
78 | static struct smc911x_platdata smc911x_info = { | ||
79 | .flags = SMC911X_USE_32BIT, | ||
80 | .irq_flags = IRQF_SHARED | IRQF_TRIGGER_LOW, | ||
81 | }; | ||
82 | |||
83 | static struct platform_device pcm037_eth = { | ||
84 | .name = "smc911x", | ||
85 | .id = -1, | ||
86 | .num_resources = ARRAY_SIZE(smc911x_resources), | ||
87 | .resource = smc911x_resources, | ||
88 | .dev = { | ||
89 | .platform_data = &smc911x_info, | ||
90 | }, | ||
91 | }; | ||
92 | |||
62 | static struct platform_device *devices[] __initdata = { | 93 | static struct platform_device *devices[] __initdata = { |
63 | &pcm037_flash, | 94 | &pcm037_flash, |
95 | &pcm037_eth, | ||
64 | }; | 96 | }; |
65 | 97 | ||
66 | /* | 98 | /* |
@@ -84,6 +116,11 @@ static void __init mxc_board_init(void) | |||
84 | 116 | ||
85 | mxc_iomux_mode(MX31_PIN_BATT_LINE__OWIRE); | 117 | mxc_iomux_mode(MX31_PIN_BATT_LINE__OWIRE); |
86 | mxc_register_device(&mxc_w1_master_device, NULL); | 118 | mxc_register_device(&mxc_w1_master_device, NULL); |
119 | |||
120 | /* SMSC9215 IRQ pin */ | ||
121 | mxc_iomux_mode(IOMUX_MODE(MX31_PIN_GPIO3_1, IOMUX_CONFIG_GPIO)); | ||
122 | if (!gpio_request(MX31_PIN_GPIO3_1, "pcm037-eth")) | ||
123 | gpio_direction_input(MX31_PIN_GPIO3_1); | ||
87 | } | 124 | } |
88 | 125 | ||
89 | /* | 126 | /* |