diff options
author | Kuninori Morimoto <morimoto.kuninori@renesas.com> | 2010-02-17 04:30:14 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-02-17 22:34:51 -0500 |
commit | 1b7e0677fb1513605df327ae2987d17e0b2ae3ea (patch) | |
tree | 9bfd90360be1ef021b0b0c21037e7fa24357ec0d /arch/arm | |
parent | b789b3fdccc1690826331f4c878b644c3904ca6b (diff) |
ARM: mach-shmobile: SMSC 9220 support for AP4EVB.
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/arm')
-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)); |