diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-mx3/mx31pdk.c | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/arch/arm/mach-mx3/mx31pdk.c b/arch/arm/mach-mx3/mx31pdk.c index 32599e507534..c19838d2e369 100644 --- a/arch/arm/mach-mx3/mx31pdk.c +++ b/arch/arm/mach-mx3/mx31pdk.c | |||
@@ -21,6 +21,8 @@ | |||
21 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
22 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
23 | #include <linux/gpio.h> | 23 | #include <linux/gpio.h> |
24 | #include <linux/smsc911x.h> | ||
25 | #include <linux/platform_device.h> | ||
24 | 26 | ||
25 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
26 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
@@ -56,6 +58,39 @@ static struct imxuart_platform_data uart_pdata = { | |||
56 | }; | 58 | }; |
57 | 59 | ||
58 | /* | 60 | /* |
61 | * Support for the SMSC9217 on the Debug board. | ||
62 | */ | ||
63 | |||
64 | static struct smsc911x_platform_config smsc911x_config = { | ||
65 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | ||
66 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, | ||
67 | .flags = SMSC911X_USE_16BIT | SMSC911X_FORCE_INTERNAL_PHY, | ||
68 | .phy_interface = PHY_INTERFACE_MODE_MII, | ||
69 | }; | ||
70 | |||
71 | static struct resource smsc911x_resources[] = { | ||
72 | { | ||
73 | .start = LAN9217_BASE_ADDR, | ||
74 | .end = LAN9217_BASE_ADDR + 0xff, | ||
75 | .flags = IORESOURCE_MEM, | ||
76 | }, { | ||
77 | .start = EXPIO_INT_ENET, | ||
78 | .end = EXPIO_INT_ENET, | ||
79 | .flags = IORESOURCE_IRQ, | ||
80 | }, | ||
81 | }; | ||
82 | |||
83 | static struct platform_device smsc911x_device = { | ||
84 | .name = "smsc911x", | ||
85 | .id = -1, | ||
86 | .num_resources = ARRAY_SIZE(smsc911x_resources), | ||
87 | .resource = smsc911x_resources, | ||
88 | .dev = { | ||
89 | .platform_data = &smsc911x_config, | ||
90 | }, | ||
91 | }; | ||
92 | |||
93 | /* | ||
59 | * Routines for the CPLD on the debug board. It contains a CPLD handling | 94 | * Routines for the CPLD on the debug board. It contains a CPLD handling |
60 | * LEDs, switches, interrupts for Ethernet. | 95 | * LEDs, switches, interrupts for Ethernet. |
61 | */ | 96 | */ |
@@ -207,7 +242,8 @@ static void __init mxc_board_init(void) | |||
207 | 242 | ||
208 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 243 | mxc_register_device(&mxc_uart_device0, &uart_pdata); |
209 | 244 | ||
210 | mx31pdk_init_expio(); | 245 | if (!mx31pdk_init_expio()) |
246 | platform_device_register(&smsc911x_device); | ||
211 | } | 247 | } |
212 | 248 | ||
213 | static void __init mx31pdk_timer_init(void) | 249 | static void __init mx31pdk_timer_init(void) |