diff options
author | Magnus Damm <damm@opensource.se> | 2009-10-01 22:23:19 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-10-25 21:37:06 -0400 |
commit | d2a2fb97d1af449238d24356b1659325cf00372e (patch) | |
tree | 6d8d1c33d2eef9e5c81956faed79e67f11057007 /arch/sh/boards/mach-kfr2r09/setup.c | |
parent | 0f79af600946d2c0067587fe8154f36095a1ba97 (diff) |
sh: SDHI platform data to the kfr2r09 board
Add SD Card support to the kfr2r09 board using the
sh_mobile_sdhi driver hooked up to SDHI0 and yc304.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards/mach-kfr2r09/setup.c')
-rw-r--r-- | arch/sh/boards/mach-kfr2r09/setup.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c index c08d33fe2104..6ce550cf9ba9 100644 --- a/arch/sh/boards/mach-kfr2r09/setup.c +++ b/arch/sh/boards/mach-kfr2r09/setup.c | |||
@@ -212,11 +212,34 @@ static struct platform_device kfr2r09_usb0_gadget_device = { | |||
212 | .resource = kfr2r09_usb0_gadget_resources, | 212 | .resource = kfr2r09_usb0_gadget_resources, |
213 | }; | 213 | }; |
214 | 214 | ||
215 | static struct resource kfr2r09_sh_sdhi0_resources[] = { | ||
216 | [0] = { | ||
217 | .name = "SDHI0", | ||
218 | .start = 0x04ce0000, | ||
219 | .end = 0x04ce01ff, | ||
220 | .flags = IORESOURCE_MEM, | ||
221 | }, | ||
222 | [1] = { | ||
223 | .start = 101, | ||
224 | .flags = IORESOURCE_IRQ, | ||
225 | }, | ||
226 | }; | ||
227 | |||
228 | static struct platform_device kfr2r09_sh_sdhi0_device = { | ||
229 | .name = "sh_mobile_sdhi", | ||
230 | .num_resources = ARRAY_SIZE(kfr2r09_sh_sdhi0_resources), | ||
231 | .resource = kfr2r09_sh_sdhi0_resources, | ||
232 | .archdata = { | ||
233 | .hwblk_id = HWBLK_SDHI0, | ||
234 | }, | ||
235 | }; | ||
236 | |||
215 | static struct platform_device *kfr2r09_devices[] __initdata = { | 237 | static struct platform_device *kfr2r09_devices[] __initdata = { |
216 | &kfr2r09_nor_flash_device, | 238 | &kfr2r09_nor_flash_device, |
217 | &kfr2r09_nand_flash_device, | 239 | &kfr2r09_nand_flash_device, |
218 | &kfr2r09_sh_keysc_device, | 240 | &kfr2r09_sh_keysc_device, |
219 | &kfr2r09_sh_lcdc_device, | 241 | &kfr2r09_sh_lcdc_device, |
242 | &kfr2r09_sh_sdhi0_device, | ||
220 | }; | 243 | }; |
221 | 244 | ||
222 | #define BSC_CS0BCR 0xfec10004 | 245 | #define BSC_CS0BCR 0xfec10004 |
@@ -361,6 +384,16 @@ static int __init kfr2r09_devices_setup(void) | |||
361 | if (kfr2r09_usb0_gadget_setup() == 0) | 384 | if (kfr2r09_usb0_gadget_setup() == 0) |
362 | platform_device_register(&kfr2r09_usb0_gadget_device); | 385 | platform_device_register(&kfr2r09_usb0_gadget_device); |
363 | 386 | ||
387 | /* SDHI0 connected to yc304 */ | ||
388 | gpio_request(GPIO_FN_SDHI0CD, NULL); | ||
389 | gpio_request(GPIO_FN_SDHI0WP, NULL); | ||
390 | gpio_request(GPIO_FN_SDHI0D3, NULL); | ||
391 | gpio_request(GPIO_FN_SDHI0D2, NULL); | ||
392 | gpio_request(GPIO_FN_SDHI0D1, NULL); | ||
393 | gpio_request(GPIO_FN_SDHI0D0, NULL); | ||
394 | gpio_request(GPIO_FN_SDHI0CMD, NULL); | ||
395 | gpio_request(GPIO_FN_SDHI0CLK, NULL); | ||
396 | |||
364 | return platform_add_devices(kfr2r09_devices, | 397 | return platform_add_devices(kfr2r09_devices, |
365 | ARRAY_SIZE(kfr2r09_devices)); | 398 | ARRAY_SIZE(kfr2r09_devices)); |
366 | } | 399 | } |