aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s5pv210
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2010-08-05 05:00:12 -0400
committerKukjin Kim <kgene.kim@samsung.com>2010-08-05 05:36:22 -0400
commitba3fbef93590e50fec5b044aa87aa5fc89af3e78 (patch)
treeb07086c7ec54d018788ba29e2d1917877ee837a2 /arch/arm/mach-s5pv210
parent170d7415db431801baf5105298cf73131cc6d4f2 (diff)
ARM: S5PV210: Add SDHCI devices for Aquila board
This patch add support for SDHCI blocks on Samsung Aquila board. The following host controllers are defined: 1. Internal MoviNAND device (permanently wired to the controller) 2. Internal WiFI SDIO device (card is activated by power regualor) 3. External MMC/SD socket (card detection is provided by external gpio interrupt) Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s5pv210')
-rw-r--r--arch/arm/mach-s5pv210/Kconfig4
-rw-r--r--arch/arm/mach-s5pv210/mach-aquila.c39
2 files changed, 43 insertions, 0 deletions
diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
index d9464a6d9416..a392748dffa0 100644
--- a/arch/arm/mach-s5pv210/Kconfig
+++ b/arch/arm/mach-s5pv210/Kconfig
@@ -60,8 +60,12 @@ config MACH_AQUILA
60 select CPU_S5PV210 60 select CPU_S5PV210
61 select ARCH_SPARSEMEM_ENABLE 61 select ARCH_SPARSEMEM_ENABLE
62 select S5PV210_SETUP_FB_24BPP 62 select S5PV210_SETUP_FB_24BPP
63 select S5PV210_SETUP_SDHCI
63 select S3C_DEV_FB 64 select S3C_DEV_FB
64 select S5PC110_DEV_ONENAND 65 select S5PC110_DEV_ONENAND
66 select S3C_DEV_HSMMC
67 select S3C_DEV_HSMMC1
68 select S3C_DEV_HSMMC2
65 help 69 help
66 Machine support for the Samsung Aquila target based on S5PC110 SoC 70 Machine support for the Samsung Aquila target based on S5PC110 SoC
67 71
diff --git a/arch/arm/mach-s5pv210/mach-aquila.c b/arch/arm/mach-s5pv210/mach-aquila.c
index 099261867e73..0c894010e278 100644
--- a/arch/arm/mach-s5pv210/mach-aquila.c
+++ b/arch/arm/mach-s5pv210/mach-aquila.c
@@ -35,6 +35,7 @@
35#include <plat/devs.h> 35#include <plat/devs.h>
36#include <plat/cpu.h> 36#include <plat/cpu.h>
37#include <plat/fb.h> 37#include <plat/fb.h>
38#include <plat/sdhci.h>
38 39
39/* Following are default values for UCON, ULCON and UFCON UART registers */ 40/* Following are default values for UCON, ULCON and UFCON UART registers */
40#define S5PV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ 41#define S5PV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
@@ -440,11 +441,47 @@ static void __init aquila_pmic_init(void)
440 s3c_gpio_setpull(S5PV210_GPH2(6), S3C_GPIO_PULL_UP); 441 s3c_gpio_setpull(S5PV210_GPH2(6), S3C_GPIO_PULL_UP);
441} 442}
442 443
444/* MoviNAND */
445static struct s3c_sdhci_platdata aquila_hsmmc0_data __initdata = {
446 .max_width = 4,
447 .cd_type = S3C_SDHCI_CD_PERMANENT,
448};
449
450/* Wireless LAN */
451static struct s3c_sdhci_platdata aquila_hsmmc1_data __initdata = {
452 .max_width = 4,
453 .cd_type = S3C_SDHCI_CD_EXTERNAL,
454 /* ext_cd_{init,cleanup} callbacks will be added later */
455};
456
457/* External Flash */
458#define AQUILA_EXT_FLASH_EN S5PV210_MP05(4)
459#define AQUILA_EXT_FLASH_CD S5PV210_GPH3(4)
460static struct s3c_sdhci_platdata aquila_hsmmc2_data __initdata = {
461 .max_width = 4,
462 .cd_type = S3C_SDHCI_CD_GPIO,
463 .ext_cd_gpio = AQUILA_EXT_FLASH_CD,
464 .ext_cd_gpio_invert = 1,
465};
466
467static void aquila_setup_sdhci(void)
468{
469 gpio_request(AQUILA_EXT_FLASH_EN, "FLASH_EN");
470 gpio_direction_output(AQUILA_EXT_FLASH_EN, 1);
471
472 s3c_sdhci0_set_platdata(&aquila_hsmmc0_data);
473 s3c_sdhci1_set_platdata(&aquila_hsmmc1_data);
474 s3c_sdhci2_set_platdata(&aquila_hsmmc2_data);
475};
476
443static struct platform_device *aquila_devices[] __initdata = { 477static struct platform_device *aquila_devices[] __initdata = {
444 &aquila_i2c_gpio_pmic, 478 &aquila_i2c_gpio_pmic,
445 &aquila_device_gpiokeys, 479 &aquila_device_gpiokeys,
446 &s3c_device_fb, 480 &s3c_device_fb,
447 &s5pc110_device_onenand, 481 &s5pc110_device_onenand,
482 &s3c_device_hsmmc0,
483 &s3c_device_hsmmc1,
484 &s3c_device_hsmmc2,
448}; 485};
449 486
450static void __init aquila_map_io(void) 487static void __init aquila_map_io(void)
@@ -460,6 +497,8 @@ static void __init aquila_machine_init(void)
460 aquila_pmic_init(); 497 aquila_pmic_init();
461 i2c_register_board_info(AP_I2C_GPIO_PMIC_BUS_4, i2c_gpio_pmic_devs, 498 i2c_register_board_info(AP_I2C_GPIO_PMIC_BUS_4, i2c_gpio_pmic_devs,
462 ARRAY_SIZE(i2c_gpio_pmic_devs)); 499 ARRAY_SIZE(i2c_gpio_pmic_devs));
500 /* SDHCI */
501 aquila_setup_sdhci();
463 502
464 /* FB */ 503 /* FB */
465 s3c_fb_set_platdata(&aquila_lcd_pdata); 504 s3c_fb_set_platdata(&aquila_lcd_pdata);