aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung
diff options
context:
space:
mode:
authorHyuk Lee <hyuk1.lee@samsung.com>2010-10-05 06:07:41 -0400
committerKukjin Kim <kgene.kim@samsung.com>2010-10-25 03:02:26 -0400
commit1036c3ab6045ccf21b23427081c7b5d4149142dd (patch)
tree87c007c37d453d5ea7784eb123fe80abf5860bc6 /arch/arm/plat-samsung
parent193151142b736f25882f250b6db3b02efd2d3cab (diff)
ARM: S5PV310: Add HSMMC platform data
This patch adds initialization HSMMC device information. And HSMMC platform data like card detect, data bus width and capability is configured. 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/plat-samsung')
-rw-r--r--arch/arm/plat-samsung/include/plat/sdhci.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h
index 30844c263d03..d92670ad9897 100644
--- a/arch/arm/plat-samsung/include/plat/sdhci.h
+++ b/arch/arm/plat-samsung/include/plat/sdhci.h
@@ -110,6 +110,10 @@ extern void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
110extern void s5pv210_setup_sdhci1_cfg_gpio(struct platform_device *, int w); 110extern void s5pv210_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
111extern void s5pv210_setup_sdhci2_cfg_gpio(struct platform_device *, int w); 111extern void s5pv210_setup_sdhci2_cfg_gpio(struct platform_device *, int w);
112extern void s5pv210_setup_sdhci3_cfg_gpio(struct platform_device *, int w); 112extern void s5pv210_setup_sdhci3_cfg_gpio(struct platform_device *, int w);
113extern void s5pv310_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
114extern void s5pv310_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
115extern void s5pv310_setup_sdhci2_cfg_gpio(struct platform_device *, int w);
116extern void s5pv310_setup_sdhci3_cfg_gpio(struct platform_device *, int w);
113 117
114/* S3C64XX SDHCI setup */ 118/* S3C64XX SDHCI setup */
115 119
@@ -288,4 +292,57 @@ static inline void s5pv210_default_sdhci3(void) { }
288 292
289#endif /* CONFIG_S5PV210_SETUP_SDHCI */ 293#endif /* CONFIG_S5PV210_SETUP_SDHCI */
290 294
295/* S5PV310 SDHCI setup */
296#ifdef CONFIG_S5PV310_SETUP_SDHCI
297extern char *s5pv310_hsmmc_clksrcs[4];
298
299extern void s5pv310_setup_sdhci_cfg_card(struct platform_device *dev,
300 void __iomem *r,
301 struct mmc_ios *ios,
302 struct mmc_card *card);
303
304static inline void s5pv310_default_sdhci0(void)
305{
306#ifdef CONFIG_S3C_DEV_HSMMC
307 s3c_hsmmc0_def_platdata.clocks = s5pv310_hsmmc_clksrcs;
308 s3c_hsmmc0_def_platdata.cfg_gpio = s5pv310_setup_sdhci0_cfg_gpio;
309 s3c_hsmmc0_def_platdata.cfg_card = s5pv310_setup_sdhci_cfg_card;
310#endif
311}
312
313static inline void s5pv310_default_sdhci1(void)
314{
315#ifdef CONFIG_S3C_DEV_HSMMC1
316 s3c_hsmmc1_def_platdata.clocks = s5pv310_hsmmc_clksrcs;
317 s3c_hsmmc1_def_platdata.cfg_gpio = s5pv310_setup_sdhci1_cfg_gpio;
318 s3c_hsmmc1_def_platdata.cfg_card = s5pv310_setup_sdhci_cfg_card;
319#endif
320}
321
322static inline void s5pv310_default_sdhci2(void)
323{
324#ifdef CONFIG_S3C_DEV_HSMMC2
325 s3c_hsmmc2_def_platdata.clocks = s5pv310_hsmmc_clksrcs;
326 s3c_hsmmc2_def_platdata.cfg_gpio = s5pv310_setup_sdhci2_cfg_gpio;
327 s3c_hsmmc2_def_platdata.cfg_card = s5pv310_setup_sdhci_cfg_card;
328#endif
329}
330
331static inline void s5pv310_default_sdhci3(void)
332{
333#ifdef CONFIG_S3C_DEV_HSMMC3
334 s3c_hsmmc3_def_platdata.clocks = s5pv310_hsmmc_clksrcs;
335 s3c_hsmmc3_def_platdata.cfg_gpio = s5pv310_setup_sdhci3_cfg_gpio;
336 s3c_hsmmc3_def_platdata.cfg_card = s5pv310_setup_sdhci_cfg_card;
337#endif
338}
339
340#else
341static inline void s5pv310_default_sdhci0(void) { }
342static inline void s5pv310_default_sdhci1(void) { }
343static inline void s5pv310_default_sdhci2(void) { }
344static inline void s5pv310_default_sdhci3(void) { }
345
346#endif /* CONFIG_S5PV310_SETUP_SDHCI */
347
291#endif /* __PLAT_S3C_SDHCI_H */ 348#endif /* __PLAT_S3C_SDHCI_H */