diff options
-rw-r--r-- | arch/arm/mach-s5pv210/Kconfig | 5 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/cpu.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/include/mach/map.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/mach-smdkv210.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/setup-sdhci-gpio.c | 20 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/sdhci.h | 13 |
6 files changed, 44 insertions, 0 deletions
diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig index 411bc9a529b2..12a2c6b6d8bd 100644 --- a/arch/arm/mach-s5pv210/Kconfig +++ b/arch/arm/mach-s5pv210/Kconfig | |||
@@ -102,6 +102,10 @@ config MACH_SMDKV210 | |||
102 | select CPU_S5PV210 | 102 | select CPU_S5PV210 |
103 | select ARCH_SPARSEMEM_ENABLE | 103 | select ARCH_SPARSEMEM_ENABLE |
104 | select SAMSUNG_DEV_ADC | 104 | select SAMSUNG_DEV_ADC |
105 | select S3C_DEV_HSMMC | ||
106 | select S3C_DEV_HSMMC1 | ||
107 | select S3C_DEV_HSMMC2 | ||
108 | select S3C_DEV_HSMMC3 | ||
105 | select SAMSUNG_DEV_IDE | 109 | select SAMSUNG_DEV_IDE |
106 | select SAMSUNG_DEV_KEYPAD | 110 | select SAMSUNG_DEV_KEYPAD |
107 | select SAMSUNG_DEV_TS | 111 | select SAMSUNG_DEV_TS |
@@ -109,6 +113,7 @@ config MACH_SMDKV210 | |||
109 | select S5PV210_SETUP_KEYPAD | 113 | select S5PV210_SETUP_KEYPAD |
110 | select HAVE_S3C2410_WATCHDOG | 114 | select HAVE_S3C2410_WATCHDOG |
111 | select S5PV210_SETUP_IDE | 115 | select S5PV210_SETUP_IDE |
116 | select S5PV210_SETUP_SDHCI | ||
112 | help | 117 | help |
113 | Machine support for Samsung SMDKV210 | 118 | Machine support for Samsung SMDKV210 |
114 | 119 | ||
diff --git a/arch/arm/mach-s5pv210/cpu.c b/arch/arm/mach-s5pv210/cpu.c index 15e983a3f09f..a0b1687247c9 100644 --- a/arch/arm/mach-s5pv210/cpu.c +++ b/arch/arm/mach-s5pv210/cpu.c | |||
@@ -87,6 +87,7 @@ void __init s5pv210_map_io(void) | |||
87 | s5pv210_default_sdhci0(); | 87 | s5pv210_default_sdhci0(); |
88 | s5pv210_default_sdhci1(); | 88 | s5pv210_default_sdhci1(); |
89 | s5pv210_default_sdhci2(); | 89 | s5pv210_default_sdhci2(); |
90 | s5pv210_default_sdhci3(); | ||
90 | 91 | ||
91 | s3c_cfcon_setname("s5pv210-pata"); | 92 | s3c_cfcon_setname("s5pv210-pata"); |
92 | 93 | ||
diff --git a/arch/arm/mach-s5pv210/include/mach/map.h b/arch/arm/mach-s5pv210/include/mach/map.h index d0af0c1a526e..9f6c2ed2812f 100644 --- a/arch/arm/mach-s5pv210/include/mach/map.h +++ b/arch/arm/mach-s5pv210/include/mach/map.h | |||
@@ -101,6 +101,7 @@ | |||
101 | #define S3C_PA_HSMMC0 S5PV210_PA_HSMMC(0) | 101 | #define S3C_PA_HSMMC0 S5PV210_PA_HSMMC(0) |
102 | #define S3C_PA_HSMMC1 S5PV210_PA_HSMMC(1) | 102 | #define S3C_PA_HSMMC1 S5PV210_PA_HSMMC(1) |
103 | #define S3C_PA_HSMMC2 S5PV210_PA_HSMMC(2) | 103 | #define S3C_PA_HSMMC2 S5PV210_PA_HSMMC(2) |
104 | #define S3C_PA_HSMMC3 S5PV210_PA_HSMMC(3) | ||
104 | #define S3C_PA_IIC S5PV210_PA_IIC0 | 105 | #define S3C_PA_IIC S5PV210_PA_IIC0 |
105 | #define S3C_PA_IIC1 S5PV210_PA_IIC1 | 106 | #define S3C_PA_IIC1 S5PV210_PA_IIC1 |
106 | #define S3C_PA_IIC2 S5PV210_PA_IIC2 | 107 | #define S3C_PA_IIC2 S5PV210_PA_IIC2 |
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c index 485ea339dbc4..d20adf7407bc 100644 --- a/arch/arm/mach-s5pv210/mach-smdkv210.c +++ b/arch/arm/mach-s5pv210/mach-smdkv210.c | |||
@@ -103,6 +103,10 @@ static struct platform_device *smdkv210_devices[] __initdata = { | |||
103 | &s5pv210_device_ac97, | 103 | &s5pv210_device_ac97, |
104 | &s3c_device_adc, | 104 | &s3c_device_adc, |
105 | &s3c_device_cfcon, | 105 | &s3c_device_cfcon, |
106 | &s3c_device_hsmmc0, | ||
107 | &s3c_device_hsmmc1, | ||
108 | &s3c_device_hsmmc2, | ||
109 | &s3c_device_hsmmc3, | ||
106 | &samsung_device_keypad, | 110 | &samsung_device_keypad, |
107 | &s3c_device_ts, | 111 | &s3c_device_ts, |
108 | &s3c_device_wdt, | 112 | &s3c_device_wdt, |
diff --git a/arch/arm/mach-s5pv210/setup-sdhci-gpio.c b/arch/arm/mach-s5pv210/setup-sdhci-gpio.c index fe7d86dad14c..143bfec1e05f 100644 --- a/arch/arm/mach-s5pv210/setup-sdhci-gpio.c +++ b/arch/arm/mach-s5pv210/setup-sdhci-gpio.c | |||
@@ -102,3 +102,23 @@ void s5pv210_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width) | |||
102 | s3c_gpio_setpull(S5PV210_GPG2(2), S3C_GPIO_PULL_UP); | 102 | s3c_gpio_setpull(S5PV210_GPG2(2), S3C_GPIO_PULL_UP); |
103 | s3c_gpio_cfgpin(S5PV210_GPG2(2), S3C_GPIO_SFN(2)); | 103 | s3c_gpio_cfgpin(S5PV210_GPG2(2), S3C_GPIO_SFN(2)); |
104 | } | 104 | } |
105 | |||
106 | void s5pv210_setup_sdhci3_cfg_gpio(struct platform_device *dev, int width) | ||
107 | { | ||
108 | unsigned int gpio; | ||
109 | |||
110 | /* Set all the necessary GPG3[0:2] pins to special-function 2 */ | ||
111 | for (gpio = S5PV210_GPG3(0); gpio < S5PV210_GPG3(2); gpio++) { | ||
112 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); | ||
113 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); | ||
114 | } | ||
115 | |||
116 | /* Data pin GPG3[3:6] to special-function 2 */ | ||
117 | for (gpio = S5PV210_GPG3(3); gpio <= S5PV210_GPG3(6); gpio++) { | ||
118 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); | ||
119 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); | ||
120 | } | ||
121 | |||
122 | s3c_gpio_setpull(S5PV210_GPG3(2), S3C_GPIO_PULL_UP); | ||
123 | s3c_gpio_cfgpin(S5PV210_GPG3(2), S3C_GPIO_SFN(2)); | ||
124 | } | ||
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h index 016674fa20dd..10413728530f 100644 --- a/arch/arm/plat-samsung/include/plat/sdhci.h +++ b/arch/arm/plat-samsung/include/plat/sdhci.h | |||
@@ -78,6 +78,7 @@ extern void s3c64xx_setup_sdhci2_cfg_gpio(struct platform_device *, int w); | |||
78 | extern void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *, int w); | 78 | extern void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *, int w); |
79 | extern void s5pv210_setup_sdhci1_cfg_gpio(struct platform_device *, int w); | 79 | extern void s5pv210_setup_sdhci1_cfg_gpio(struct platform_device *, int w); |
80 | extern void s5pv210_setup_sdhci2_cfg_gpio(struct platform_device *, int w); | 80 | extern void s5pv210_setup_sdhci2_cfg_gpio(struct platform_device *, int w); |
81 | extern void s5pv210_setup_sdhci3_cfg_gpio(struct platform_device *, int w); | ||
81 | 82 | ||
82 | /* S3C6400 SDHCI setup */ | 83 | /* S3C6400 SDHCI setup */ |
83 | 84 | ||
@@ -266,10 +267,22 @@ static inline void s5pv210_default_sdhci2(void) | |||
266 | static inline void s5pv210_default_sdhci2(void) { } | 267 | static inline void s5pv210_default_sdhci2(void) { } |
267 | #endif /* CONFIG_S3C_DEV_HSMMC2 */ | 268 | #endif /* CONFIG_S3C_DEV_HSMMC2 */ |
268 | 269 | ||
270 | #ifdef CONFIG_S3C_DEV_HSMMC3 | ||
271 | static inline void s5pv210_default_sdhci3(void) | ||
272 | { | ||
273 | s3c_hsmmc3_def_platdata.clocks = s5pv210_hsmmc_clksrcs; | ||
274 | s3c_hsmmc3_def_platdata.cfg_gpio = s5pv210_setup_sdhci3_cfg_gpio; | ||
275 | s3c_hsmmc3_def_platdata.cfg_card = s5pv210_setup_sdhci_cfg_card; | ||
276 | } | ||
277 | #else | ||
278 | static inline void s5pv210_default_sdhci3(void) { } | ||
279 | #endif /* CONFIG_S3C_DEV_HSMMC3 */ | ||
280 | |||
269 | #else | 281 | #else |
270 | static inline void s5pv210_default_sdhci0(void) { } | 282 | static inline void s5pv210_default_sdhci0(void) { } |
271 | static inline void s5pv210_default_sdhci1(void) { } | 283 | static inline void s5pv210_default_sdhci1(void) { } |
272 | static inline void s5pv210_default_sdhci2(void) { } | 284 | static inline void s5pv210_default_sdhci2(void) { } |
285 | static inline void s5pv210_default_sdhci3(void) { } | ||
273 | #endif /* CONFIG_S5PC100_SETUP_SDHCI */ | 286 | #endif /* CONFIG_S5PC100_SETUP_SDHCI */ |
274 | 287 | ||
275 | 288 | ||