diff options
author | Kukjin Kim <kgene.kim@samsung.com> | 2011-01-06 04:44:09 -0500 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-01-06 04:44:09 -0500 |
commit | 854bf596b3be4f4b41c5b3bd8039e4828ec1ace6 (patch) | |
tree | 27b967178723f0230043dc0b0d1436d2eb81a29d /arch/arm/plat-samsung | |
parent | ab10f1dd914ad87e0370bd8b82f77dcd32b6d941 (diff) | |
parent | 13d27f05d7b2c41d59c6e4bd6fc4ea10d3302ec3 (diff) |
Merge branch 'next-s3c24xx' into for-next
Diffstat (limited to 'arch/arm/plat-samsung')
-rw-r--r-- | arch/arm/plat-samsung/Kconfig | 6 | ||||
-rw-r--r-- | arch/arm/plat-samsung/dev-nand.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-samsung/gpio-config.c | 42 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/sdhci.h | 35 |
5 files changed, 84 insertions, 3 deletions
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig index 2ebf4157d93a..32be05cf82a3 100644 --- a/arch/arm/plat-samsung/Kconfig +++ b/arch/arm/plat-samsung/Kconfig | |||
@@ -95,6 +95,12 @@ config S3C_GPIO_PULL_UPDOWN | |||
95 | help | 95 | help |
96 | Internal configuration to enable the correct GPIO pull helper | 96 | Internal configuration to enable the correct GPIO pull helper |
97 | 97 | ||
98 | config S3C_GPIO_PULL_S3C2443 | ||
99 | bool | ||
100 | select S3C_GPIO_PULL_UPDOWN | ||
101 | help | ||
102 | Internal configuration to enable the correct GPIO pull helper for S3C2443-style GPIO | ||
103 | |||
98 | config S3C_GPIO_PULL_DOWN | 104 | config S3C_GPIO_PULL_DOWN |
99 | bool | 105 | bool |
100 | help | 106 | help |
diff --git a/arch/arm/plat-samsung/dev-nand.c b/arch/arm/plat-samsung/dev-nand.c index 3a7b8891ba4f..6927ae8fd118 100644 --- a/arch/arm/plat-samsung/dev-nand.c +++ b/arch/arm/plat-samsung/dev-nand.c | |||
@@ -126,5 +126,3 @@ void __init s3c_nand_set_platdata(struct s3c2410_platform_nand *nand) | |||
126 | 126 | ||
127 | s3c_device_nand.dev.platform_data = npd; | 127 | s3c_device_nand.dev.platform_data = npd; |
128 | } | 128 | } |
129 | |||
130 | EXPORT_SYMBOL_GPL(s3c_nand_set_platdata); | ||
diff --git a/arch/arm/plat-samsung/gpio-config.c b/arch/arm/plat-samsung/gpio-config.c index 0aa32f242ee4..1c0b0401594b 100644 --- a/arch/arm/plat-samsung/gpio-config.c +++ b/arch/arm/plat-samsung/gpio-config.c | |||
@@ -278,6 +278,48 @@ s3c_gpio_pull_t s3c_gpio_getpull_updown(struct s3c_gpio_chip *chip, | |||
278 | pup &= 0x3; | 278 | pup &= 0x3; |
279 | return (__force s3c_gpio_pull_t)pup; | 279 | return (__force s3c_gpio_pull_t)pup; |
280 | } | 280 | } |
281 | |||
282 | #ifdef CONFIG_S3C_GPIO_PULL_S3C2443 | ||
283 | int s3c_gpio_setpull_s3c2443(struct s3c_gpio_chip *chip, | ||
284 | unsigned int off, s3c_gpio_pull_t pull) | ||
285 | { | ||
286 | switch (pull) { | ||
287 | case S3C_GPIO_PULL_NONE: | ||
288 | pull = 0x01; | ||
289 | break; | ||
290 | case S3C_GPIO_PULL_UP: | ||
291 | pull = 0x00; | ||
292 | break; | ||
293 | case S3C_GPIO_PULL_DOWN: | ||
294 | pull = 0x02; | ||
295 | break; | ||
296 | } | ||
297 | return s3c_gpio_setpull_updown(chip, off, pull); | ||
298 | } | ||
299 | |||
300 | s3c_gpio_pull_t s3c_gpio_getpull_s3c2443(struct s3c_gpio_chip *chip, | ||
301 | unsigned int off) | ||
302 | { | ||
303 | s3c_gpio_pull_t pull; | ||
304 | |||
305 | pull = s3c_gpio_getpull_updown(chip, off); | ||
306 | |||
307 | switch (pull) { | ||
308 | case 0x00: | ||
309 | pull = S3C_GPIO_PULL_UP; | ||
310 | break; | ||
311 | case 0x01: | ||
312 | case 0x03: | ||
313 | pull = S3C_GPIO_PULL_NONE; | ||
314 | break; | ||
315 | case 0x02: | ||
316 | pull = S3C_GPIO_PULL_DOWN; | ||
317 | break; | ||
318 | } | ||
319 | |||
320 | return pull; | ||
321 | } | ||
322 | #endif | ||
281 | #endif | 323 | #endif |
282 | 324 | ||
283 | #if defined(CONFIG_S3C_GPIO_PULL_UP) || defined(CONFIG_S3C_GPIO_PULL_DOWN) | 325 | #if defined(CONFIG_S3C_GPIO_PULL_UP) || defined(CONFIG_S3C_GPIO_PULL_DOWN) |
diff --git a/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h b/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h index 0d2c5703f1ee..5603db0b79bc 100644 --- a/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h +++ b/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h | |||
@@ -244,7 +244,7 @@ extern int s3c_gpio_setpull_s3c2443(struct s3c_gpio_chip *chip, | |||
244 | * This helper function reads the state of the pull-{up,down} resistor for the | 244 | * This helper function reads the state of the pull-{up,down} resistor for the |
245 | * given GPIO in the same case as s3c_gpio_setpull_upown. | 245 | * given GPIO in the same case as s3c_gpio_setpull_upown. |
246 | */ | 246 | */ |
247 | extern s3c_gpio_pull_t s3c_gpio_getpull_s3c24xx(struct s3c_gpio_chip *chip, | 247 | extern s3c_gpio_pull_t s3c_gpio_getpull_s3c2443(struct s3c_gpio_chip *chip, |
248 | unsigned int off); | 248 | unsigned int off); |
249 | 249 | ||
250 | #endif /* __PLAT_GPIO_CFG_HELPERS_H */ | 250 | #endif /* __PLAT_GPIO_CFG_HELPERS_H */ |
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h index 85853f8c4c5d..5a41a0b69eec 100644 --- a/arch/arm/plat-samsung/include/plat/sdhci.h +++ b/arch/arm/plat-samsung/include/plat/sdhci.h | |||
@@ -107,6 +107,8 @@ extern struct s3c_sdhci_platdata s3c_hsmmc3_def_platdata; | |||
107 | 107 | ||
108 | /* Helper function availablity */ | 108 | /* Helper function availablity */ |
109 | 109 | ||
110 | extern void s3c2416_setup_sdhci0_cfg_gpio(struct platform_device *, int w); | ||
111 | extern void s3c2416_setup_sdhci1_cfg_gpio(struct platform_device *, int w); | ||
110 | extern void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *, int w); | 112 | extern void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *, int w); |
111 | extern void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *, int w); | 113 | extern void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *, int w); |
112 | extern void s5pc100_setup_sdhci0_cfg_gpio(struct platform_device *, int w); | 114 | extern void s5pc100_setup_sdhci0_cfg_gpio(struct platform_device *, int w); |
@@ -122,6 +124,39 @@ extern void s5pv310_setup_sdhci1_cfg_gpio(struct platform_device *, int w); | |||
122 | extern void s5pv310_setup_sdhci2_cfg_gpio(struct platform_device *, int w); | 124 | extern void s5pv310_setup_sdhci2_cfg_gpio(struct platform_device *, int w); |
123 | extern void s5pv310_setup_sdhci3_cfg_gpio(struct platform_device *, int w); | 125 | extern void s5pv310_setup_sdhci3_cfg_gpio(struct platform_device *, int w); |
124 | 126 | ||
127 | /* S3C2416 SDHCI setup */ | ||
128 | |||
129 | #ifdef CONFIG_S3C2416_SETUP_SDHCI | ||
130 | extern char *s3c2416_hsmmc_clksrcs[4]; | ||
131 | |||
132 | extern void s3c2416_setup_sdhci_cfg_card(struct platform_device *dev, | ||
133 | void __iomem *r, | ||
134 | struct mmc_ios *ios, | ||
135 | struct mmc_card *card); | ||
136 | |||
137 | static inline void s3c2416_default_sdhci0(void) | ||
138 | { | ||
139 | #ifdef CONFIG_S3C_DEV_HSMMC | ||
140 | s3c_hsmmc0_def_platdata.clocks = s3c2416_hsmmc_clksrcs; | ||
141 | s3c_hsmmc0_def_platdata.cfg_gpio = s3c2416_setup_sdhci0_cfg_gpio; | ||
142 | s3c_hsmmc0_def_platdata.cfg_card = s3c2416_setup_sdhci_cfg_card; | ||
143 | #endif /* CONFIG_S3C_DEV_HSMMC */ | ||
144 | } | ||
145 | |||
146 | static inline void s3c2416_default_sdhci1(void) | ||
147 | { | ||
148 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
149 | s3c_hsmmc1_def_platdata.clocks = s3c2416_hsmmc_clksrcs; | ||
150 | s3c_hsmmc1_def_platdata.cfg_gpio = s3c2416_setup_sdhci1_cfg_gpio; | ||
151 | s3c_hsmmc1_def_platdata.cfg_card = s3c2416_setup_sdhci_cfg_card; | ||
152 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ | ||
153 | } | ||
154 | |||
155 | #else | ||
156 | static inline void s3c2416_default_sdhci0(void) { } | ||
157 | static inline void s3c2416_default_sdhci1(void) { } | ||
158 | |||
159 | #endif /* CONFIG_S3C2416_SETUP_SDHCI */ | ||
125 | /* S3C64XX SDHCI setup */ | 160 | /* S3C64XX SDHCI setup */ |
126 | 161 | ||
127 | #ifdef CONFIG_S3C64XX_SETUP_SDHCI | 162 | #ifdef CONFIG_S3C64XX_SETUP_SDHCI |