aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung
diff options
context:
space:
mode:
authorKukjin Kim <kgene.kim@samsung.com>2010-07-29 09:18:45 -0400
committerKukjin Kim <kgene.kim@samsung.com>2010-08-05 05:32:52 -0400
commit88eb715673804949b0086a5b182d52cca4fd4d43 (patch)
treece7fdbf055500c6fee3f1caed0bbf884b8949e3b /arch/arm/plat-samsung
parent4b623926ba8e29393077fc3e01d1141a3ee2e2e9 (diff)
ARM: SAMSUNG: updates sdhci.h for Samsung SoCs
This patch updates sdhci.h as Maurus suggestion like following: From: #ifdef ... function() { blahblah; } #else function() { } #endif To: function() { #ifdef ... blahblah; #endif } And fixes a couple of typos. Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Conflicts: arch/arm/plat-samsung/include/plat/sdhci.h
Diffstat (limited to 'arch/arm/plat-samsung')
-rw-r--r--arch/arm/plat-samsung/include/plat/sdhci.h85
1 files changed, 28 insertions, 57 deletions
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h
index 3880cc736a98..44018111a981 100644
--- a/arch/arm/plat-samsung/include/plat/sdhci.h
+++ b/arch/arm/plat-samsung/include/plat/sdhci.h
@@ -110,12 +110,11 @@ 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);
112 112
113/* S3C6400 SDHCI setup */ 113/* S3C64XX SDHCI setup */
114 114
115#ifdef CONFIG_S3C64XX_SETUP_SDHCI 115#ifdef CONFIG_S3C64XX_SETUP_SDHCI
116extern char *s3c64xx_hsmmc_clksrcs[4]; 116extern char *s3c64xx_hsmmc_clksrcs[4];
117 117
118#ifdef CONFIG_S3C_DEV_HSMMC
119extern void s3c6400_setup_sdhci_cfg_card(struct platform_device *dev, 118extern void s3c6400_setup_sdhci_cfg_card(struct platform_device *dev,
120 void __iomem *r, 119 void __iomem *r,
121 struct mmc_ios *ios, 120 struct mmc_ios *ios,
@@ -123,76 +122,62 @@ extern void s3c6400_setup_sdhci_cfg_card(struct platform_device *dev,
123 122
124static inline void s3c6400_default_sdhci0(void) 123static inline void s3c6400_default_sdhci0(void)
125{ 124{
125#ifdef CONFIG_S3C_DEV_HSMMC
126 s3c_hsmmc0_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; 126 s3c_hsmmc0_def_platdata.clocks = s3c64xx_hsmmc_clksrcs;
127 s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio; 127 s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio;
128 s3c_hsmmc0_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card; 128 s3c_hsmmc0_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card;
129#endif
129} 130}
130 131
131#else
132static inline void s3c6400_default_sdhci0(void) { }
133#endif /* CONFIG_S3C_DEV_HSMMC */
134
135#ifdef CONFIG_S3C_DEV_HSMMC1
136static inline void s3c6400_default_sdhci1(void) 132static inline void s3c6400_default_sdhci1(void)
137{ 133{
134#ifdef CONFIG_S3C_DEV_HSMMC1
138 s3c_hsmmc1_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; 135 s3c_hsmmc1_def_platdata.clocks = s3c64xx_hsmmc_clksrcs;
139 s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio; 136 s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio;
140 s3c_hsmmc1_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card; 137 s3c_hsmmc1_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card;
138#endif
141} 139}
142#else
143static inline void s3c6400_default_sdhci1(void) { }
144#endif /* CONFIG_S3C_DEV_HSMMC1 */
145 140
146#ifdef CONFIG_S3C_DEV_HSMMC2
147static inline void s3c6400_default_sdhci2(void) 141static inline void s3c6400_default_sdhci2(void)
148{ 142{
143#ifdef CONFIG_S3C_DEV_HSMMC2
149 s3c_hsmmc2_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; 144 s3c_hsmmc2_def_platdata.clocks = s3c64xx_hsmmc_clksrcs;
150 s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio; 145 s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio;
151 s3c_hsmmc2_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card; 146 s3c_hsmmc2_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card;
147#endif
152} 148}
153#else
154static inline void s3c6400_default_sdhci2(void) { }
155#endif /* CONFIG_S3C_DEV_HSMMC2 */
156
157/* S3C6410 SDHCI setup */
158 149
159extern void s3c6410_setup_sdhci_cfg_card(struct platform_device *dev, 150extern void s3c6410_setup_sdhci_cfg_card(struct platform_device *dev,
160 void __iomem *r, 151 void __iomem *r,
161 struct mmc_ios *ios, 152 struct mmc_ios *ios,
162 struct mmc_card *card); 153 struct mmc_card *card);
163 154
164#ifdef CONFIG_S3C_DEV_HSMMC
165static inline void s3c6410_default_sdhci0(void) 155static inline void s3c6410_default_sdhci0(void)
166{ 156{
157#ifdef CONFIG_S3C_DEV_HSMMC
167 s3c_hsmmc0_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; 158 s3c_hsmmc0_def_platdata.clocks = s3c64xx_hsmmc_clksrcs;
168 s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio; 159 s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio;
169 s3c_hsmmc0_def_platdata.cfg_card = s3c6410_setup_sdhci_cfg_card; 160 s3c_hsmmc0_def_platdata.cfg_card = s3c6410_setup_sdhci_cfg_card;
161#endif
170} 162}
171#else
172static inline void s3c6410_default_sdhci0(void) { }
173#endif /* CONFIG_S3C_DEV_HSMMC */
174 163
175#ifdef CONFIG_S3C_DEV_HSMMC1
176static inline void s3c6410_default_sdhci1(void) 164static inline void s3c6410_default_sdhci1(void)
177{ 165{
166#ifdef CONFIG_S3C_DEV_HSMMC1
178 s3c_hsmmc1_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; 167 s3c_hsmmc1_def_platdata.clocks = s3c64xx_hsmmc_clksrcs;
179 s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio; 168 s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio;
180 s3c_hsmmc1_def_platdata.cfg_card = s3c6410_setup_sdhci_cfg_card; 169 s3c_hsmmc1_def_platdata.cfg_card = s3c6410_setup_sdhci_cfg_card;
170#endif
181} 171}
182#else
183static inline void s3c6410_default_sdhci1(void) { }
184#endif /* CONFIG_S3C_DEV_HSMMC1 */
185 172
186#ifdef CONFIG_S3C_DEV_HSMMC2
187static inline void s3c6410_default_sdhci2(void) 173static inline void s3c6410_default_sdhci2(void)
188{ 174{
175#ifdef CONFIG_S3C_DEV_HSMMC2
189 s3c_hsmmc2_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; 176 s3c_hsmmc2_def_platdata.clocks = s3c64xx_hsmmc_clksrcs;
190 s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio; 177 s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio;
191 s3c_hsmmc2_def_platdata.cfg_card = s3c6410_setup_sdhci_cfg_card; 178 s3c_hsmmc2_def_platdata.cfg_card = s3c6410_setup_sdhci_cfg_card;
179#endif
192} 180}
193#else
194static inline void s3c6410_default_sdhci2(void) { }
195#endif /* CONFIG_S3C_DEV_HSMMC2 */
196 181
197#else 182#else
198static inline void s3c6410_default_sdhci0(void) { } 183static inline void s3c6410_default_sdhci0(void) { }
@@ -214,48 +199,42 @@ extern void s5pc100_setup_sdhci0_cfg_card(struct platform_device *dev,
214 struct mmc_ios *ios, 199 struct mmc_ios *ios,
215 struct mmc_card *card); 200 struct mmc_card *card);
216 201
217#ifdef CONFIG_S3C_DEV_HSMMC
218static inline void s5pc100_default_sdhci0(void) 202static inline void s5pc100_default_sdhci0(void)
219{ 203{
204#ifdef CONFIG_S3C_DEV_HSMMC
220 s3c_hsmmc0_def_platdata.clocks = s5pc100_hsmmc_clksrcs; 205 s3c_hsmmc0_def_platdata.clocks = s5pc100_hsmmc_clksrcs;
221 s3c_hsmmc0_def_platdata.cfg_gpio = s5pc100_setup_sdhci0_cfg_gpio; 206 s3c_hsmmc0_def_platdata.cfg_gpio = s5pc100_setup_sdhci0_cfg_gpio;
222 s3c_hsmmc0_def_platdata.cfg_card = s5pc100_setup_sdhci0_cfg_card; 207 s3c_hsmmc0_def_platdata.cfg_card = s5pc100_setup_sdhci0_cfg_card;
208#endif
223} 209}
224#else
225static inline void s5pc100_default_sdhci0(void) { }
226#endif /* CONFIG_S3C_DEV_HSMMC */
227 210
228#ifdef CONFIG_S3C_DEV_HSMMC1
229static inline void s5pc100_default_sdhci1(void) 211static inline void s5pc100_default_sdhci1(void)
230{ 212{
213#ifdef CONFIG_S3C_DEV_HSMMC1
231 s3c_hsmmc1_def_platdata.clocks = s5pc100_hsmmc_clksrcs; 214 s3c_hsmmc1_def_platdata.clocks = s5pc100_hsmmc_clksrcs;
232 s3c_hsmmc1_def_platdata.cfg_gpio = s5pc100_setup_sdhci1_cfg_gpio; 215 s3c_hsmmc1_def_platdata.cfg_gpio = s5pc100_setup_sdhci1_cfg_gpio;
233 s3c_hsmmc1_def_platdata.cfg_card = s5pc100_setup_sdhci0_cfg_card; 216 s3c_hsmmc1_def_platdata.cfg_card = s5pc100_setup_sdhci0_cfg_card;
217#endif
234} 218}
235#else
236static inline void s5pc100_default_sdhci1(void) { }
237#endif /* CONFIG_S3C_DEV_HSMMC1 */
238 219
239#ifdef CONFIG_S3C_DEV_HSMMC2
240static inline void s5pc100_default_sdhci2(void) 220static inline void s5pc100_default_sdhci2(void)
241{ 221{
222#ifdef CONFIG_S3C_DEV_HSMMC2
242 s3c_hsmmc2_def_platdata.clocks = s5pc100_hsmmc_clksrcs; 223 s3c_hsmmc2_def_platdata.clocks = s5pc100_hsmmc_clksrcs;
243 s3c_hsmmc2_def_platdata.cfg_gpio = s5pc100_setup_sdhci2_cfg_gpio; 224 s3c_hsmmc2_def_platdata.cfg_gpio = s5pc100_setup_sdhci2_cfg_gpio;
244 s3c_hsmmc2_def_platdata.cfg_card = s5pc100_setup_sdhci0_cfg_card; 225 s3c_hsmmc2_def_platdata.cfg_card = s5pc100_setup_sdhci0_cfg_card;
226#endif
245} 227}
246#else
247static inline void s5pc100_default_sdhci2(void) { }
248#endif /* CONFIG_S3C_DEV_HSMMC1 */
249
250 228
251#else 229#else
252static inline void s5pc100_default_sdhci0(void) { } 230static inline void s5pc100_default_sdhci0(void) { }
253static inline void s5pc100_default_sdhci1(void) { } 231static inline void s5pc100_default_sdhci1(void) { }
254static inline void s5pc100_default_sdhci2(void) { } 232static inline void s5pc100_default_sdhci2(void) { }
233
255#endif /* CONFIG_S5PC100_SETUP_SDHCI */ 234#endif /* CONFIG_S5PC100_SETUP_SDHCI */
256 235
236/* S5PV210 SDHCI setup */
257 237
258/* S5PC110 SDHCI setup */
259#ifdef CONFIG_S5PV210_SETUP_SDHCI 238#ifdef CONFIG_S5PV210_SETUP_SDHCI
260extern char *s5pv210_hsmmc_clksrcs[4]; 239extern char *s5pv210_hsmmc_clksrcs[4];
261 240
@@ -264,46 +243,38 @@ extern void s5pv210_setup_sdhci_cfg_card(struct platform_device *dev,
264 struct mmc_ios *ios, 243 struct mmc_ios *ios,
265 struct mmc_card *card); 244 struct mmc_card *card);
266 245
267#ifdef CONFIG_S3C_DEV_HSMMC
268static inline void s5pv210_default_sdhci0(void) 246static inline void s5pv210_default_sdhci0(void)
269{ 247{
248#ifdef CONFIG_S3C_DEV_HSMMC
270 s3c_hsmmc0_def_platdata.clocks = s5pv210_hsmmc_clksrcs; 249 s3c_hsmmc0_def_platdata.clocks = s5pv210_hsmmc_clksrcs;
271 s3c_hsmmc0_def_platdata.cfg_gpio = s5pv210_setup_sdhci0_cfg_gpio; 250 s3c_hsmmc0_def_platdata.cfg_gpio = s5pv210_setup_sdhci0_cfg_gpio;
272 s3c_hsmmc0_def_platdata.cfg_card = s5pv210_setup_sdhci_cfg_card; 251 s3c_hsmmc0_def_platdata.cfg_card = s5pv210_setup_sdhci_cfg_card;
252#endif
273} 253}
274#else
275static inline void s5pv210_default_sdhci0(void) { }
276#endif /* CONFIG_S3C_DEV_HSMMC */
277 254
278#ifdef CONFIG_S3C_DEV_HSMMC1
279static inline void s5pv210_default_sdhci1(void) 255static inline void s5pv210_default_sdhci1(void)
280{ 256{
257#ifdef CONFIG_S3C_DEV_HSMMC1
281 s3c_hsmmc1_def_platdata.clocks = s5pv210_hsmmc_clksrcs; 258 s3c_hsmmc1_def_platdata.clocks = s5pv210_hsmmc_clksrcs;
282 s3c_hsmmc1_def_platdata.cfg_gpio = s5pv210_setup_sdhci1_cfg_gpio; 259 s3c_hsmmc1_def_platdata.cfg_gpio = s5pv210_setup_sdhci1_cfg_gpio;
283 s3c_hsmmc1_def_platdata.cfg_card = s5pv210_setup_sdhci_cfg_card; 260 s3c_hsmmc1_def_platdata.cfg_card = s5pv210_setup_sdhci_cfg_card;
261#endif
284} 262}
285#else
286static inline void s5pv210_default_sdhci1(void) { }
287#endif /* CONFIG_S3C_DEV_HSMMC1 */
288 263
289#ifdef CONFIG_S3C_DEV_HSMMC2
290static inline void s5pv210_default_sdhci2(void) 264static inline void s5pv210_default_sdhci2(void)
291{ 265{
266#ifdef CONFIG_S3C_DEV_HSMMC2
292 s3c_hsmmc2_def_platdata.clocks = s5pv210_hsmmc_clksrcs; 267 s3c_hsmmc2_def_platdata.clocks = s5pv210_hsmmc_clksrcs;
293 s3c_hsmmc2_def_platdata.cfg_gpio = s5pv210_setup_sdhci2_cfg_gpio; 268 s3c_hsmmc2_def_platdata.cfg_gpio = s5pv210_setup_sdhci2_cfg_gpio;
294 s3c_hsmmc2_def_platdata.cfg_card = s5pv210_setup_sdhci_cfg_card; 269 s3c_hsmmc2_def_platdata.cfg_card = s5pv210_setup_sdhci_cfg_card;
270#endif
295} 271}
296#else
297static inline void s5pv210_default_sdhci2(void) { }
298#endif /* CONFIG_S3C_DEV_HSMMC2 */
299 272
300#else 273#else
301static inline void s5pv210_default_sdhci0(void) { } 274static inline void s5pv210_default_sdhci0(void) { }
302static inline void s5pv210_default_sdhci1(void) { } 275static inline void s5pv210_default_sdhci1(void) { }
303static inline void s5pv210_default_sdhci2(void) { } 276static inline void s5pv210_default_sdhci2(void) { }
304#endif /* CONFIG_S5PC100_SETUP_SDHCI */
305
306
307 277
278#endif /* CONFIG_S5PV210_SETUP_SDHCI */
308 279
309#endif /* __PLAT_S3C_SDHCI_H */ 280#endif /* __PLAT_S3C_SDHCI_H */