aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s5pv310/mach-smdkv310.c
diff options
context:
space:
mode:
authorHyuk Lee <hyuk1.lee@samsung.com>2010-10-06 01:50:20 -0400
committerKukjin Kim <kgene.kim@samsung.com>2010-10-25 03:02:36 -0400
commit2b11148a80bf1a022e8165ae0026bf6ff5778f03 (patch)
tree6f743ba717f3b0c1c41cf4097a601804640cc334 /arch/arm/mach-s5pv310/mach-smdkv310.c
parent1036c3ab6045ccf21b23427081c7b5d4149142dd (diff)
ARM: S5PV310: Add support HSMMC on SMDKV310 and SMDKC210
This patch adds support HSMMC for S5PV310(SMDKV310) and S5PC210(SMDKC210). Signed-off-by: Hyuk Lee <hyuk1.lee@samsung.com> Signed-off-by: Jeongbae Seo <jeongbae.seo@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s5pv310/mach-smdkv310.c')
-rw-r--r--arch/arm/mach-s5pv310/mach-smdkv310.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/arch/arm/mach-s5pv310/mach-smdkv310.c b/arch/arm/mach-s5pv310/mach-smdkv310.c
index 9cb827da97f5..6eff6ceac912 100644
--- a/arch/arm/mach-s5pv310/mach-smdkv310.c
+++ b/arch/arm/mach-s5pv310/mach-smdkv310.c
@@ -9,6 +9,9 @@
9*/ 9*/
10 10
11#include <linux/serial_core.h> 11#include <linux/serial_core.h>
12#include <linux/gpio.h>
13#include <linux/mmc/host.h>
14#include <linux/platform_device.h>
12 15
13#include <asm/mach/arch.h> 16#include <asm/mach/arch.h>
14#include <asm/mach-types.h> 17#include <asm/mach-types.h>
@@ -18,6 +21,7 @@
18#include <plat/s5pv310.h> 21#include <plat/s5pv310.h>
19#include <plat/cpu.h> 22#include <plat/cpu.h>
20#include <plat/devs.h> 23#include <plat/devs.h>
24#include <plat/sdhci.h>
21 25
22#include <mach/map.h> 26#include <mach/map.h>
23 27
@@ -66,7 +70,43 @@ static struct s3c2410_uartcfg smdkv310_uartcfgs[] __initdata = {
66 }, 70 },
67}; 71};
68 72
73static struct s3c_sdhci_platdata smdkv310_hsmmc0_pdata __initdata = {
74 .cd_type = S3C_SDHCI_CD_GPIO,
75 .ext_cd_gpio = S5PV310_GPK0(2),
76 .ext_cd_gpio_invert = 1,
77#ifdef CONFIG_S5PV310_SDHCI_CH0_8BIT
78 .max_width = 8,
79 .host_caps = MMC_CAP_8_BIT_DATA,
80#endif
81};
82
83static struct s3c_sdhci_platdata smdkv310_hsmmc1_pdata __initdata = {
84 .cd_type = S3C_SDHCI_CD_GPIO,
85 .ext_cd_gpio = S5PV310_GPK0(2),
86 .ext_cd_gpio_invert = 1,
87};
88
89static struct s3c_sdhci_platdata smdkv310_hsmmc2_pdata __initdata = {
90 .cd_type = S3C_SDHCI_CD_GPIO,
91 .ext_cd_gpio = S5PV310_GPK2(2),
92 .ext_cd_gpio_invert = 1,
93#ifdef CONFIG_S5PV310_SDHCI_CH2_8BIT
94 .max_width = 8,
95 .host_caps = MMC_CAP_8_BIT_DATA,
96#endif
97};
98
99static struct s3c_sdhci_platdata smdkv310_hsmmc3_pdata __initdata = {
100 .cd_type = S3C_SDHCI_CD_GPIO,
101 .ext_cd_gpio = S5PV310_GPK2(2),
102 .ext_cd_gpio_invert = 1,
103};
104
69static struct platform_device *smdkv310_devices[] __initdata = { 105static struct platform_device *smdkv310_devices[] __initdata = {
106 &s3c_device_hsmmc0,
107 &s3c_device_hsmmc1,
108 &s3c_device_hsmmc2,
109 &s3c_device_hsmmc3,
70 &s3c_device_rtc, 110 &s3c_device_rtc,
71 &s3c_device_wdt, 111 &s3c_device_wdt,
72}; 112};
@@ -80,6 +120,11 @@ static void __init smdkv310_map_io(void)
80 120
81static void __init smdkv310_machine_init(void) 121static void __init smdkv310_machine_init(void)
82{ 122{
123 s3c_sdhci0_set_platdata(&smdkv310_hsmmc0_pdata);
124 s3c_sdhci1_set_platdata(&smdkv310_hsmmc1_pdata);
125 s3c_sdhci2_set_platdata(&smdkv310_hsmmc2_pdata);
126 s3c_sdhci3_set_platdata(&smdkv310_hsmmc3_pdata);
127
83#ifdef CONFIG_CACHE_L2X0 128#ifdef CONFIG_CACHE_L2X0
84 l2x0_init(S5P_VA_L2CC, 1 << 28, 0xffffffff); 129 l2x0_init(S5P_VA_L2CC, 1 << 28, 0xffffffff);
85#endif 130#endif