diff options
author | Magnus Damm <damm@opensource.se> | 2010-02-19 04:54:06 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-03-14 22:13:14 -0400 |
commit | 143f3b833f98271341379d813cb72deb1657a380 (patch) | |
tree | e4e9ae3879024b06c64ae4e07713c34d215dc640 /arch | |
parent | 03fb256df9c960b10c0e01b7e92d2f31433675fe (diff) |
ARM: mach-shmobile: G3EVM FLCTL platform data
This patch adds FLCTL platform data for the G3EVM board.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-shmobile/board-g3evm.c | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-g3evm.c b/arch/arm/mach-shmobile/board-g3evm.c index 9d326893a212..9247503296c4 100644 --- a/arch/arm/mach-shmobile/board-g3evm.c +++ b/arch/arm/mach-shmobile/board-g3evm.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/mtd/mtd.h> | 26 | #include <linux/mtd/mtd.h> |
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/mtd/sh_flctl.h> | ||
29 | #include <linux/usb/r8a66597.h> | 30 | #include <linux/usb/r8a66597.h> |
30 | #include <linux/io.h> | 31 | #include <linux/io.h> |
31 | #include <linux/gpio.h> | 32 | #include <linux/gpio.h> |
@@ -166,10 +167,53 @@ static struct platform_device keysc_device = { | |||
166 | }, | 167 | }, |
167 | }; | 168 | }; |
168 | 169 | ||
170 | static struct mtd_partition nand_partition_info[] = { | ||
171 | { | ||
172 | .name = "system", | ||
173 | .offset = 0, | ||
174 | .size = 64 * 1024 * 1024, | ||
175 | }, | ||
176 | { | ||
177 | .name = "userdata", | ||
178 | .offset = MTDPART_OFS_APPEND, | ||
179 | .size = 128 * 1024 * 1024, | ||
180 | }, | ||
181 | { | ||
182 | .name = "cache", | ||
183 | .offset = MTDPART_OFS_APPEND, | ||
184 | .size = 64 * 1024 * 1024, | ||
185 | }, | ||
186 | }; | ||
187 | |||
188 | static struct resource nand_flash_resources[] = { | ||
189 | [0] = { | ||
190 | .start = 0xe6a30000, | ||
191 | .end = 0xe6a3009b, | ||
192 | .flags = IORESOURCE_MEM, | ||
193 | } | ||
194 | }; | ||
195 | |||
196 | static struct sh_flctl_platform_data nand_flash_data = { | ||
197 | .parts = nand_partition_info, | ||
198 | .nr_parts = ARRAY_SIZE(nand_partition_info), | ||
199 | .flcmncr_val = QTSEL_E | FCKSEL_E | TYPESEL_SET | NANWF_E | ||
200 | | SHBUSSEL | SEL_16BIT, | ||
201 | }; | ||
202 | |||
203 | static struct platform_device nand_flash_device = { | ||
204 | .name = "sh_flctl", | ||
205 | .resource = nand_flash_resources, | ||
206 | .num_resources = ARRAY_SIZE(nand_flash_resources), | ||
207 | .dev = { | ||
208 | .platform_data = &nand_flash_data, | ||
209 | }, | ||
210 | }; | ||
211 | |||
169 | static struct platform_device *g3evm_devices[] __initdata = { | 212 | static struct platform_device *g3evm_devices[] __initdata = { |
170 | &nor_flash_device, | 213 | &nor_flash_device, |
171 | &usb_host_device, | 214 | &usb_host_device, |
172 | &keysc_device, | 215 | &keysc_device, |
216 | &nand_flash_device, | ||
173 | }; | 217 | }; |
174 | 218 | ||
175 | static struct map_desc g3evm_io_desc[] __initdata = { | 219 | static struct map_desc g3evm_io_desc[] __initdata = { |
@@ -251,6 +295,29 @@ static void __init g3evm_init(void) | |||
251 | gpio_request(GPIO_FN_PORT57_KEYIN5_PU, NULL); | 295 | gpio_request(GPIO_FN_PORT57_KEYIN5_PU, NULL); |
252 | gpio_request(GPIO_FN_PORT58_KEYIN6_PU, NULL); | 296 | gpio_request(GPIO_FN_PORT58_KEYIN6_PU, NULL); |
253 | 297 | ||
298 | /* FLCTL */ | ||
299 | gpio_request(GPIO_FN_FCE0, NULL); | ||
300 | gpio_request(GPIO_FN_D0_ED0_NAF0, NULL); | ||
301 | gpio_request(GPIO_FN_D1_ED1_NAF1, NULL); | ||
302 | gpio_request(GPIO_FN_D2_ED2_NAF2, NULL); | ||
303 | gpio_request(GPIO_FN_D3_ED3_NAF3, NULL); | ||
304 | gpio_request(GPIO_FN_D4_ED4_NAF4, NULL); | ||
305 | gpio_request(GPIO_FN_D5_ED5_NAF5, NULL); | ||
306 | gpio_request(GPIO_FN_D6_ED6_NAF6, NULL); | ||
307 | gpio_request(GPIO_FN_D7_ED7_NAF7, NULL); | ||
308 | gpio_request(GPIO_FN_D8_ED8_NAF8, NULL); | ||
309 | gpio_request(GPIO_FN_D9_ED9_NAF9, NULL); | ||
310 | gpio_request(GPIO_FN_D10_ED10_NAF10, NULL); | ||
311 | gpio_request(GPIO_FN_D11_ED11_NAF11, NULL); | ||
312 | gpio_request(GPIO_FN_D12_ED12_NAF12, NULL); | ||
313 | gpio_request(GPIO_FN_D13_ED13_NAF13, NULL); | ||
314 | gpio_request(GPIO_FN_D14_ED14_NAF14, NULL); | ||
315 | gpio_request(GPIO_FN_D15_ED15_NAF15, NULL); | ||
316 | gpio_request(GPIO_FN_WE0_XWR0_FWE, NULL); | ||
317 | gpio_request(GPIO_FN_FRB, NULL); | ||
318 | /* FOE, FCDE, FSC on dedicated pins */ | ||
319 | __raw_writel(__raw_readl(0xe6158048) & ~(1 << 15), 0xe6158048); | ||
320 | |||
254 | sh7367_add_standard_devices(); | 321 | sh7367_add_standard_devices(); |
255 | 322 | ||
256 | platform_add_devices(g3evm_devices, ARRAY_SIZE(g3evm_devices)); | 323 | platform_add_devices(g3evm_devices, ARRAY_SIZE(g3evm_devices)); |