aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s3c/include
diff options
context:
space:
mode:
authorKyungmin Park <kyungmin.park@samsung.com>2009-11-17 02:41:23 -0500
committerBen Dooks <ben-linux@fluff.org>2009-11-30 20:33:17 -0500
commit86cd4f5f83acbfa481c513c74666ad360b49d73b (patch)
treefadf026dc26dc06b7d6fc3d8405aa96795db23e9 /arch/arm/plat-s3c/include
parent067f131d09d89bd56864f1f4b3144cc778024b33 (diff)
ARM: S5PC1xx: add platform helpers for SDHCI host controllers
Samsung S5PC100 has 3 SDHCI controllers compatible with the one known from previous SoCs series. Add required platform setup and support code that the devices can be used with sdhci-s3c driver. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-s3c/include')
-rw-r--r--arch/arm/plat-s3c/include/plat/sdhci.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/arch/arm/plat-s3c/include/plat/sdhci.h b/arch/arm/plat-s3c/include/plat/sdhci.h
index f615308ccdfb..c71d07861840 100644
--- a/arch/arm/plat-s3c/include/plat/sdhci.h
+++ b/arch/arm/plat-s3c/include/plat/sdhci.h
@@ -57,6 +57,7 @@ struct s3c_sdhci_platdata {
57 */ 57 */
58extern void s3c_sdhci0_set_platdata(struct s3c_sdhci_platdata *pd); 58extern void s3c_sdhci0_set_platdata(struct s3c_sdhci_platdata *pd);
59extern void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd); 59extern void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd);
60extern void s3c_sdhci2_set_platdata(struct s3c_sdhci_platdata *pd);
60 61
61/* Default platform data, exported so that per-cpu initialisation can 62/* Default platform data, exported so that per-cpu initialisation can
62 * set the correct one when there are more than one cpu type selected. 63 * set the correct one when there are more than one cpu type selected.
@@ -64,11 +65,15 @@ extern void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd);
64 65
65extern struct s3c_sdhci_platdata s3c_hsmmc0_def_platdata; 66extern struct s3c_sdhci_platdata s3c_hsmmc0_def_platdata;
66extern struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata; 67extern struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata;
68extern struct s3c_sdhci_platdata s3c_hsmmc2_def_platdata;
67 69
68/* Helper function availablity */ 70/* Helper function availablity */
69 71
70extern void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *, int w); 72extern void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
71extern void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *, int w); 73extern void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
74extern void s5pc100_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
75extern void s5pc100_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
76extern void s5pc100_setup_sdhci2_cfg_gpio(struct platform_device *, int w);
72 77
73/* S3C6400 SDHCI setup */ 78/* S3C6400 SDHCI setup */
74 79
@@ -145,4 +150,54 @@ static inline void s3c6410_default_sdhci0(void) { }
145static inline void s3c6410_default_sdhci1(void) { } 150static inline void s3c6410_default_sdhci1(void) { }
146#endif /* CONFIG_S3C6410_SETUP_SDHCI */ 151#endif /* CONFIG_S3C6410_SETUP_SDHCI */
147 152
153/* S5PC100 SDHCI setup */
154
155#ifdef CONFIG_S5PC100_SETUP_SDHCI
156extern char *s5pc100_hsmmc_clksrcs[4];
157
158extern void s5pc100_setup_sdhci0_cfg_card(struct platform_device *dev,
159 void __iomem *r,
160 struct mmc_ios *ios,
161 struct mmc_card *card);
162
163#ifdef CONFIG_S3C_DEV_HSMMC
164static inline void s5pc100_default_sdhci0(void)
165{
166 s3c_hsmmc0_def_platdata.clocks = s5pc100_hsmmc_clksrcs;
167 s3c_hsmmc0_def_platdata.cfg_gpio = s5pc100_setup_sdhci0_cfg_gpio;
168 s3c_hsmmc0_def_platdata.cfg_card = s5pc100_setup_sdhci0_cfg_card;
169}
170#else
171static inline void s5pc100_default_sdhci0(void) { }
172#endif /* CONFIG_S3C_DEV_HSMMC */
173
174#ifdef CONFIG_S3C_DEV_HSMMC1
175static inline void s5pc100_default_sdhci1(void)
176{
177 s3c_hsmmc1_def_platdata.clocks = s5pc100_hsmmc_clksrcs;
178 s3c_hsmmc1_def_platdata.cfg_gpio = s5pc100_setup_sdhci1_cfg_gpio;
179 s3c_hsmmc1_def_platdata.cfg_card = s5pc100_setup_sdhci0_cfg_card;
180}
181#else
182static inline void s5pc100_default_sdhci1(void) { }
183#endif /* CONFIG_S3C_DEV_HSMMC1 */
184
185#ifdef CONFIG_S3C_DEV_HSMMC2
186static inline void s5pc100_default_sdhci2(void)
187{
188 s3c_hsmmc2_def_platdata.clocks = s5pc100_hsmmc_clksrcs;
189 s3c_hsmmc2_def_platdata.cfg_gpio = s5pc100_setup_sdhci2_cfg_gpio;
190 s3c_hsmmc2_def_platdata.cfg_card = s5pc100_setup_sdhci0_cfg_card;
191}
192#else
193static inline void s5pc100_default_sdhci2(void) { }
194#endif /* CONFIG_S3C_DEV_HSMMC1 */
195
196
197#else
198static inline void s5pc100_default_sdhci0(void) { }
199static inline void s5pc100_default_sdhci1(void) { }
200static inline void s5pc100_default_sdhci2(void) { }
201#endif /* CONFIG_S5PC100_SETUP_SDHCI */
202
148#endif /* __PLAT_S3C_SDHCI_H */ 203#endif /* __PLAT_S3C_SDHCI_H */