diff options
author | Kukjin Kim <kgene.kim@samsung.com> | 2010-07-29 09:18:45 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2010-08-05 05:32:52 -0400 |
commit | 88eb715673804949b0086a5b182d52cca4fd4d43 (patch) | |
tree | ce7fdbf055500c6fee3f1caed0bbf884b8949e3b /arch/arm/plat-samsung | |
parent | 4b623926ba8e29393077fc3e01d1141a3ee2e2e9 (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.h | 85 |
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); | |||
110 | extern void s5pv210_setup_sdhci1_cfg_gpio(struct platform_device *, int w); | 110 | extern void s5pv210_setup_sdhci1_cfg_gpio(struct platform_device *, int w); |
111 | extern void s5pv210_setup_sdhci2_cfg_gpio(struct platform_device *, int w); | 111 | extern 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 |
116 | extern char *s3c64xx_hsmmc_clksrcs[4]; | 116 | extern char *s3c64xx_hsmmc_clksrcs[4]; |
117 | 117 | ||
118 | #ifdef CONFIG_S3C_DEV_HSMMC | ||
119 | extern void s3c6400_setup_sdhci_cfg_card(struct platform_device *dev, | 118 | extern 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 | ||
124 | static inline void s3c6400_default_sdhci0(void) | 123 | static 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 | ||
132 | static inline void s3c6400_default_sdhci0(void) { } | ||
133 | #endif /* CONFIG_S3C_DEV_HSMMC */ | ||
134 | |||
135 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
136 | static inline void s3c6400_default_sdhci1(void) | 132 | static 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 | ||
143 | static inline void s3c6400_default_sdhci1(void) { } | ||
144 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ | ||
145 | 140 | ||
146 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
147 | static inline void s3c6400_default_sdhci2(void) | 141 | static 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 | ||
154 | static inline void s3c6400_default_sdhci2(void) { } | ||
155 | #endif /* CONFIG_S3C_DEV_HSMMC2 */ | ||
156 | |||
157 | /* S3C6410 SDHCI setup */ | ||
158 | 149 | ||
159 | extern void s3c6410_setup_sdhci_cfg_card(struct platform_device *dev, | 150 | extern 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 | ||
165 | static inline void s3c6410_default_sdhci0(void) | 155 | static 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 | ||
172 | static inline void s3c6410_default_sdhci0(void) { } | ||
173 | #endif /* CONFIG_S3C_DEV_HSMMC */ | ||
174 | 163 | ||
175 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
176 | static inline void s3c6410_default_sdhci1(void) | 164 | static 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 | ||
183 | static inline void s3c6410_default_sdhci1(void) { } | ||
184 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ | ||
185 | 172 | ||
186 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
187 | static inline void s3c6410_default_sdhci2(void) | 173 | static 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 | ||
194 | static inline void s3c6410_default_sdhci2(void) { } | ||
195 | #endif /* CONFIG_S3C_DEV_HSMMC2 */ | ||
196 | 181 | ||
197 | #else | 182 | #else |
198 | static inline void s3c6410_default_sdhci0(void) { } | 183 | static 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 | ||
218 | static inline void s5pc100_default_sdhci0(void) | 202 | static 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 | ||
225 | static inline void s5pc100_default_sdhci0(void) { } | ||
226 | #endif /* CONFIG_S3C_DEV_HSMMC */ | ||
227 | 210 | ||
228 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
229 | static inline void s5pc100_default_sdhci1(void) | 211 | static 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 | ||
236 | static inline void s5pc100_default_sdhci1(void) { } | ||
237 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ | ||
238 | 219 | ||
239 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
240 | static inline void s5pc100_default_sdhci2(void) | 220 | static 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 | ||
247 | static inline void s5pc100_default_sdhci2(void) { } | ||
248 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ | ||
249 | |||
250 | 228 | ||
251 | #else | 229 | #else |
252 | static inline void s5pc100_default_sdhci0(void) { } | 230 | static inline void s5pc100_default_sdhci0(void) { } |
253 | static inline void s5pc100_default_sdhci1(void) { } | 231 | static inline void s5pc100_default_sdhci1(void) { } |
254 | static inline void s5pc100_default_sdhci2(void) { } | 232 | static 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 |
260 | extern char *s5pv210_hsmmc_clksrcs[4]; | 239 | extern 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 | ||
268 | static inline void s5pv210_default_sdhci0(void) | 246 | static 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 | ||
275 | static inline void s5pv210_default_sdhci0(void) { } | ||
276 | #endif /* CONFIG_S3C_DEV_HSMMC */ | ||
277 | 254 | ||
278 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
279 | static inline void s5pv210_default_sdhci1(void) | 255 | static 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 | ||
286 | static inline void s5pv210_default_sdhci1(void) { } | ||
287 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ | ||
288 | 263 | ||
289 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
290 | static inline void s5pv210_default_sdhci2(void) | 264 | static 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 | ||
297 | static inline void s5pv210_default_sdhci2(void) { } | ||
298 | #endif /* CONFIG_S3C_DEV_HSMMC2 */ | ||
299 | 272 | ||
300 | #else | 273 | #else |
301 | static inline void s5pv210_default_sdhci0(void) { } | 274 | static inline void s5pv210_default_sdhci0(void) { } |
302 | static inline void s5pv210_default_sdhci1(void) { } | 275 | static inline void s5pv210_default_sdhci1(void) { } |
303 | static inline void s5pv210_default_sdhci2(void) { } | 276 | static 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 */ |