diff options
-rw-r--r-- | arch/arm/mach-shmobile/board-mackerel.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index b8df70928891..e2def7e27711 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/mtd/mtd.h> | 32 | #include <linux/mtd/mtd.h> |
33 | #include <linux/mtd/partitions.h> | 33 | #include <linux/mtd/partitions.h> |
34 | #include <linux/mtd/physmap.h> | 34 | #include <linux/mtd/physmap.h> |
35 | #include <linux/smsc911x.h> | ||
35 | 36 | ||
36 | #include <mach/common.h> | 37 | #include <mach/common.h> |
37 | #include <mach/sh7372.h> | 38 | #include <mach/sh7372.h> |
@@ -109,8 +110,37 @@ static struct platform_device nor_flash_device = { | |||
109 | .resource = nor_flash_resources, | 110 | .resource = nor_flash_resources, |
110 | }; | 111 | }; |
111 | 112 | ||
113 | /* SMSC */ | ||
114 | static struct resource smc911x_resources[] = { | ||
115 | { | ||
116 | .start = 0x14000000, | ||
117 | .end = 0x16000000 - 1, | ||
118 | .flags = IORESOURCE_MEM, | ||
119 | }, { | ||
120 | .start = evt2irq(0x02c0) /* IRQ6A */, | ||
121 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, | ||
122 | }, | ||
123 | }; | ||
124 | |||
125 | static struct smsc911x_platform_config smsc911x_info = { | ||
126 | .flags = SMSC911X_USE_16BIT | SMSC911X_SAVE_MAC_ADDRESS, | ||
127 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | ||
128 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, | ||
129 | }; | ||
130 | |||
131 | static struct platform_device smc911x_device = { | ||
132 | .name = "smsc911x", | ||
133 | .id = -1, | ||
134 | .num_resources = ARRAY_SIZE(smc911x_resources), | ||
135 | .resource = smc911x_resources, | ||
136 | .dev = { | ||
137 | .platform_data = &smsc911x_info, | ||
138 | }, | ||
139 | }; | ||
140 | |||
112 | static struct platform_device *mackerel_devices[] __initdata = { | 141 | static struct platform_device *mackerel_devices[] __initdata = { |
113 | &nor_flash_device, | 142 | &nor_flash_device, |
143 | &smc911x_device, | ||
114 | }; | 144 | }; |
115 | 145 | ||
116 | static struct map_desc mackerel_io_desc[] __initdata = { | 146 | static struct map_desc mackerel_io_desc[] __initdata = { |
@@ -142,6 +172,10 @@ static void __init mackerel_init(void) | |||
142 | gpio_request(GPIO_FN_SCIFA0_TXD, NULL); | 172 | gpio_request(GPIO_FN_SCIFA0_TXD, NULL); |
143 | gpio_request(GPIO_FN_SCIFA0_RXD, NULL); | 173 | gpio_request(GPIO_FN_SCIFA0_RXD, NULL); |
144 | 174 | ||
175 | /* enable SMSC911X */ | ||
176 | gpio_request(GPIO_FN_CS5A, NULL); | ||
177 | gpio_request(GPIO_FN_IRQ6_39, NULL); | ||
178 | |||
145 | sh7372_add_standard_devices(); | 179 | sh7372_add_standard_devices(); |
146 | 180 | ||
147 | platform_add_devices(mackerel_devices, ARRAY_SIZE(mackerel_devices)); | 181 | platform_add_devices(mackerel_devices, ARRAY_SIZE(mackerel_devices)); |