diff options
Diffstat (limited to 'arch/arm/plat-s3c/include/plat/sdhci.h')
-rw-r--r-- | arch/arm/plat-s3c/include/plat/sdhci.h | 78 |
1 files changed, 78 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..53198673b6bd 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,16 @@ 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); | ||
77 | extern void s3c64xx_setup_sdhci2_cfg_gpio(struct platform_device *, int w); | ||
72 | 78 | ||
73 | /* S3C6400 SDHCI setup */ | 79 | /* S3C6400 SDHCI setup */ |
74 | 80 | ||
@@ -103,6 +109,17 @@ static inline void s3c6400_default_sdhci1(void) | |||
103 | static inline void s3c6400_default_sdhci1(void) { } | 109 | static inline void s3c6400_default_sdhci1(void) { } |
104 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ | 110 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ |
105 | 111 | ||
112 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
113 | static inline void s3c6400_default_sdhci2(void) | ||
114 | { | ||
115 | s3c_hsmmc2_def_platdata.clocks = s3c6400_hsmmc_clksrcs; | ||
116 | s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio; | ||
117 | s3c_hsmmc2_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card; | ||
118 | } | ||
119 | #else | ||
120 | static inline void s3c6400_default_sdhci2(void) { } | ||
121 | #endif /* CONFIG_S3C_DEV_HSMMC2 */ | ||
122 | |||
106 | #else | 123 | #else |
107 | static inline void s3c6400_default_sdhci0(void) { } | 124 | static inline void s3c6400_default_sdhci0(void) { } |
108 | static inline void s3c6400_default_sdhci1(void) { } | 125 | static inline void s3c6400_default_sdhci1(void) { } |
@@ -140,9 +157,70 @@ static inline void s3c6410_default_sdhci1(void) | |||
140 | static inline void s3c6410_default_sdhci1(void) { } | 157 | static inline void s3c6410_default_sdhci1(void) { } |
141 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ | 158 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ |
142 | 159 | ||
160 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
161 | static inline void s3c6410_default_sdhci2(void) | ||
162 | { | ||
163 | s3c_hsmmc2_def_platdata.clocks = s3c6410_hsmmc_clksrcs; | ||
164 | s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio; | ||
165 | s3c_hsmmc2_def_platdata.cfg_card = s3c6410_setup_sdhci0_cfg_card; | ||
166 | } | ||
167 | #else | ||
168 | static inline void s3c6410_default_sdhci2(void) { } | ||
169 | #endif /* CONFIG_S3C_DEV_HSMMC2 */ | ||
170 | |||
143 | #else | 171 | #else |
144 | static inline void s3c6410_default_sdhci0(void) { } | 172 | static inline void s3c6410_default_sdhci0(void) { } |
145 | static inline void s3c6410_default_sdhci1(void) { } | 173 | static inline void s3c6410_default_sdhci1(void) { } |
146 | #endif /* CONFIG_S3C6410_SETUP_SDHCI */ | 174 | #endif /* CONFIG_S3C6410_SETUP_SDHCI */ |
147 | 175 | ||
176 | /* S5PC100 SDHCI setup */ | ||
177 | |||
178 | #ifdef CONFIG_S5PC100_SETUP_SDHCI | ||
179 | extern char *s5pc100_hsmmc_clksrcs[4]; | ||
180 | |||
181 | extern void s5pc100_setup_sdhci0_cfg_card(struct platform_device *dev, | ||
182 | void __iomem *r, | ||
183 | struct mmc_ios *ios, | ||
184 | struct mmc_card *card); | ||
185 | |||
186 | #ifdef CONFIG_S3C_DEV_HSMMC | ||
187 | static inline void s5pc100_default_sdhci0(void) | ||
188 | { | ||
189 | s3c_hsmmc0_def_platdata.clocks = s5pc100_hsmmc_clksrcs; | ||
190 | s3c_hsmmc0_def_platdata.cfg_gpio = s5pc100_setup_sdhci0_cfg_gpio; | ||
191 | s3c_hsmmc0_def_platdata.cfg_card = s5pc100_setup_sdhci0_cfg_card; | ||
192 | } | ||
193 | #else | ||
194 | static inline void s5pc100_default_sdhci0(void) { } | ||
195 | #endif /* CONFIG_S3C_DEV_HSMMC */ | ||
196 | |||
197 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
198 | static inline void s5pc100_default_sdhci1(void) | ||
199 | { | ||
200 | s3c_hsmmc1_def_platdata.clocks = s5pc100_hsmmc_clksrcs; | ||
201 | s3c_hsmmc1_def_platdata.cfg_gpio = s5pc100_setup_sdhci1_cfg_gpio; | ||
202 | s3c_hsmmc1_def_platdata.cfg_card = s5pc100_setup_sdhci0_cfg_card; | ||
203 | } | ||
204 | #else | ||
205 | static inline void s5pc100_default_sdhci1(void) { } | ||
206 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ | ||
207 | |||
208 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
209 | static inline void s5pc100_default_sdhci2(void) | ||
210 | { | ||
211 | s3c_hsmmc2_def_platdata.clocks = s5pc100_hsmmc_clksrcs; | ||
212 | s3c_hsmmc2_def_platdata.cfg_gpio = s5pc100_setup_sdhci2_cfg_gpio; | ||
213 | s3c_hsmmc2_def_platdata.cfg_card = s5pc100_setup_sdhci0_cfg_card; | ||
214 | } | ||
215 | #else | ||
216 | static inline void s5pc100_default_sdhci2(void) { } | ||
217 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ | ||
218 | |||
219 | |||
220 | #else | ||
221 | static inline void s5pc100_default_sdhci0(void) { } | ||
222 | static inline void s5pc100_default_sdhci1(void) { } | ||
223 | static inline void s5pc100_default_sdhci2(void) { } | ||
224 | #endif /* CONFIG_S5PC100_SETUP_SDHCI */ | ||
225 | |||
148 | #endif /* __PLAT_S3C_SDHCI_H */ | 226 | #endif /* __PLAT_S3C_SDHCI_H */ |