aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2009-05-20 13:54:35 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2009-05-26 06:31:13 -0400
commitcbaa6ca1f5af59ec8d0d104c1f02b65a6cf0a8aa (patch)
tree40235e7b1a8e155def1872b4c8dac18916d34710 /arch/arm/mach-mx3
parent1bc34f7964b1e8dee8d49d83cba8dad0a010df92 (diff)
ARM: MX3: add lilly-1131 ethernet support
This adds support for the SMSC911x chip found on the lilly-1131 module. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx3')
-rw-r--r--arch/arm/mach-mx3/mx31lilly.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/mx31lilly.c b/arch/arm/mach-mx3/mx31lilly.c
index a7d66cbbb2fe..e5339341c0ba 100644
--- a/arch/arm/mach-mx3/mx31lilly.c
+++ b/arch/arm/mach-mx3/mx31lilly.c
@@ -27,6 +27,9 @@
27#include <linux/types.h> 27#include <linux/types.h>
28#include <linux/init.h> 28#include <linux/init.h>
29#include <linux/clk.h> 29#include <linux/clk.h>
30#include <linux/platform_device.h>
31#include <linux/interrupt.h>
32#include <linux/smsc911x.h>
30 33
31#include <asm/mach-types.h> 34#include <asm/mach-types.h>
32#include <asm/mach/arch.h> 35#include <asm/mach/arch.h>
@@ -46,6 +49,44 @@
46 * appropriate baseboard support code. 49 * appropriate baseboard support code.
47 */ 50 */
48 51
52/* SMSC ethernet support */
53
54static struct resource smsc91x_resources[] = {
55 {
56 .start = CS4_BASE_ADDR,
57 .end = CS4_BASE_ADDR + 0xffff,
58 .flags = IORESOURCE_MEM,
59 },
60 {
61 .start = IOMUX_TO_IRQ(MX31_PIN_GPIO1_0),
62 .end = IOMUX_TO_IRQ(MX31_PIN_GPIO1_0),
63 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_FALLING,
64 }
65};
66
67static struct smsc911x_platform_config smsc911x_config = {
68 .phy_interface = PHY_INTERFACE_MODE_MII,
69 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
70 .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
71 .flags = SMSC911X_USE_32BIT |
72 SMSC911X_SAVE_MAC_ADDRESS |
73 SMSC911X_FORCE_INTERNAL_PHY,
74};
75
76static struct platform_device smsc91x_device = {
77 .name = "smsc911x",
78 .id = -1,
79 .num_resources = ARRAY_SIZE(smsc91x_resources),
80 .resource = smsc91x_resources,
81 .dev = {
82 .platform_data = &smsc911x_config,
83 }
84};
85
86static struct platform_device *devices[] __initdata = {
87 &smsc91x_device,
88};
89
49static int mx31lilly_baseboard; 90static int mx31lilly_baseboard;
50core_param(mx31lilly_baseboard, mx31lilly_baseboard, int, 0444); 91core_param(mx31lilly_baseboard, mx31lilly_baseboard, int, 0444);
51 92
@@ -61,6 +102,10 @@ static void __init mx31lilly_board_init(void)
61 printk(KERN_ERR "Illegal mx31lilly_baseboard type %d\n", 102 printk(KERN_ERR "Illegal mx31lilly_baseboard type %d\n",
62 mx31lilly_baseboard); 103 mx31lilly_baseboard);
63 } 104 }
105
106 mxc_iomux_alloc_pin(MX31_PIN_CS4__CS4, "Ethernet CS");
107
108 platform_add_devices(devices, ARRAY_SIZE(devices));
64} 109}
65 110
66static void __init mx31lilly_timer_init(void) 111static void __init mx31lilly_timer_init(void)