aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung
diff options
context:
space:
mode:
authorYauhen Kharuzhy <yauhen.kharuzhy@promwad.com>2010-12-17 00:42:09 -0500
committerKukjin Kim <kgene.kim@samsung.com>2011-01-06 00:09:18 -0500
commitc29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575 (patch)
tree8f9a2fc32f7c1a29d29413f71dd84336d45d4eca /arch/arm/plat-samsung
parent95d6791b4f8aad51caea657236234f21b50a4559 (diff)
ARM: S3C2416: Add platform helpers for setup SDHCI
Samsung S3C2416 has two SDHCI controllers compatible with other Samsung's SoCs (S3C64XX, S5PC100 etc...). Add required platform setup code that the devices can be used with sdhci-s3c driver. Signed-off-by: Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com> [kgene.kim@samsung.com: change to __raw_{readl,writel} from {readl,writel}] [kgene.kim@samsung.com: build error fixes] 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.h35
1 files changed, 35 insertions, 0 deletions
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
110extern void s3c2416_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
111extern void s3c2416_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
110extern void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *, int w); 112extern void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
111extern void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *, int w); 113extern void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
112extern void s5pc100_setup_sdhci0_cfg_gpio(struct platform_device *, int w); 114extern 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);
122extern void s5pv310_setup_sdhci2_cfg_gpio(struct platform_device *, int w); 124extern void s5pv310_setup_sdhci2_cfg_gpio(struct platform_device *, int w);
123extern void s5pv310_setup_sdhci3_cfg_gpio(struct platform_device *, int w); 125extern void s5pv310_setup_sdhci3_cfg_gpio(struct platform_device *, int w);
124 126
127/* S3C2416 SDHCI setup */
128
129#ifdef CONFIG_S3C2416_SETUP_SDHCI
130extern char *s3c2416_hsmmc_clksrcs[4];
131
132extern 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
137static 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
146static 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
156static inline void s3c2416_default_sdhci0(void) { }
157static 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