diff options
-rw-r--r-- | arch/arm/mach-shmobile/board-ap4evb.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 94b545b3fe82..70277e073808 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c | |||
@@ -27,11 +27,15 @@ | |||
27 | #include <linux/mtd/partitions.h> | 27 | #include <linux/mtd/partitions.h> |
28 | #include <linux/mtd/physmap.h> | 28 | #include <linux/mtd/physmap.h> |
29 | #include <linux/io.h> | 29 | #include <linux/io.h> |
30 | #include <linux/smsc911x.h> | ||
31 | #include <linux/gpio.h> | ||
30 | #include <mach/common.h> | 32 | #include <mach/common.h> |
33 | #include <mach/sh7372.h> | ||
31 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
32 | #include <asm/mach/arch.h> | 35 | #include <asm/mach/arch.h> |
33 | #include <asm/mach/map.h> | 36 | #include <asm/mach/map.h> |
34 | 37 | ||
38 | /* MTD */ | ||
35 | static struct mtd_partition nor_flash_partitions[] = { | 39 | static struct mtd_partition nor_flash_partitions[] = { |
36 | { | 40 | { |
37 | .name = "loader", | 41 | .name = "loader", |
@@ -84,9 +88,37 @@ static struct platform_device nor_flash_device = { | |||
84 | .resource = nor_flash_resources, | 88 | .resource = nor_flash_resources, |
85 | }; | 89 | }; |
86 | 90 | ||
91 | /* SMSC 9220 */ | ||
92 | static struct resource smc911x_resources[] = { | ||
93 | { | ||
94 | .start = 0x14000000, | ||
95 | .end = 0x16000000 - 1, | ||
96 | .flags = IORESOURCE_MEM, | ||
97 | }, { | ||
98 | .start = 6, | ||
99 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, | ||
100 | }, | ||
101 | }; | ||
102 | |||
103 | static struct smsc911x_platform_config smsc911x_info = { | ||
104 | .flags = SMSC911X_USE_16BIT | SMSC911X_SAVE_MAC_ADDRESS, | ||
105 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | ||
106 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, | ||
107 | }; | ||
108 | |||
109 | static struct platform_device smc911x_device = { | ||
110 | .name = "smsc911x", | ||
111 | .id = -1, | ||
112 | .num_resources = ARRAY_SIZE(smc911x_resources), | ||
113 | .resource = smc911x_resources, | ||
114 | .dev = { | ||
115 | .platform_data = &smsc911x_info, | ||
116 | }, | ||
117 | }; | ||
87 | 118 | ||
88 | static struct platform_device *ap4evb_devices[] __initdata = { | 119 | static struct platform_device *ap4evb_devices[] __initdata = { |
89 | &nor_flash_device, | 120 | &nor_flash_device, |
121 | &smc911x_device, | ||
90 | }; | 122 | }; |
91 | 123 | ||
92 | static struct map_desc ap4evb_io_desc[] __initdata = { | 124 | static struct map_desc ap4evb_io_desc[] __initdata = { |
@@ -113,6 +145,12 @@ static void __init ap4evb_map_io(void) | |||
113 | 145 | ||
114 | static void __init ap4evb_init(void) | 146 | static void __init ap4evb_init(void) |
115 | { | 147 | { |
148 | sh7372_pinmux_init(); | ||
149 | |||
150 | /* enable SMSC911X */ | ||
151 | gpio_request(GPIO_FN_CS5A, NULL); | ||
152 | gpio_request(GPIO_FN_IRQ6_39, NULL); | ||
153 | |||
116 | sh7372_add_standard_devices(); | 154 | sh7372_add_standard_devices(); |
117 | 155 | ||
118 | platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices)); | 156 | platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices)); |