diff options
author | Kyungmin Park <kyungmin.park@samsung.com> | 2009-11-17 02:41:23 -0500 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2009-11-30 20:33:17 -0500 |
commit | 86cd4f5f83acbfa481c513c74666ad360b49d73b (patch) | |
tree | fadf026dc26dc06b7d6fc3d8405aa96795db23e9 /arch/arm/plat-s3c/include | |
parent | 067f131d09d89bd56864f1f4b3144cc778024b33 (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.h | 55 |
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 | */ |
58 | extern void s3c_sdhci0_set_platdata(struct s3c_sdhci_platdata *pd); | 58 | extern void s3c_sdhci0_set_platdata(struct s3c_sdhci_platdata *pd); |
59 | extern void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd); | 59 | extern void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd); |
60 | extern 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 | ||
65 | extern struct s3c_sdhci_platdata s3c_hsmmc0_def_platdata; | 66 | extern struct s3c_sdhci_platdata s3c_hsmmc0_def_platdata; |
66 | extern struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata; | 67 | extern struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata; |
68 | extern struct s3c_sdhci_platdata s3c_hsmmc2_def_platdata; | ||
67 | 69 | ||
68 | /* Helper function availablity */ | 70 | /* Helper function availablity */ |
69 | 71 | ||
70 | extern void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *, int w); | 72 | extern void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *, int w); |
71 | extern void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *, int w); | 73 | extern void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *, int w); |
74 | extern void s5pc100_setup_sdhci0_cfg_gpio(struct platform_device *, int w); | ||
75 | extern void s5pc100_setup_sdhci1_cfg_gpio(struct platform_device *, int w); | ||
76 | extern 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) { } | |||
145 | static inline void s3c6410_default_sdhci1(void) { } | 150 | static 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 | ||
156 | extern char *s5pc100_hsmmc_clksrcs[4]; | ||
157 | |||
158 | extern 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 | ||
164 | static 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 | ||
171 | static inline void s5pc100_default_sdhci0(void) { } | ||
172 | #endif /* CONFIG_S3C_DEV_HSMMC */ | ||
173 | |||
174 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
175 | static 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 | ||
182 | static inline void s5pc100_default_sdhci1(void) { } | ||
183 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ | ||
184 | |||
185 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
186 | static 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 | ||
193 | static inline void s5pc100_default_sdhci2(void) { } | ||
194 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ | ||
195 | |||
196 | |||
197 | #else | ||
198 | static inline void s5pc100_default_sdhci0(void) { } | ||
199 | static inline void s5pc100_default_sdhci1(void) { } | ||
200 | static 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 */ |