diff options
-rw-r--r-- | arch/arm/mach-s5pv310/cpu.c | 7 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/sdhci.h | 57 |
2 files changed, 64 insertions, 0 deletions
diff --git a/arch/arm/mach-s5pv310/cpu.c b/arch/arm/mach-s5pv310/cpu.c index 4add39853ff9..66beac424e40 100644 --- a/arch/arm/mach-s5pv310/cpu.c +++ b/arch/arm/mach-s5pv310/cpu.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <plat/cpu.h> | 19 | #include <plat/cpu.h> |
20 | #include <plat/clock.h> | 20 | #include <plat/clock.h> |
21 | #include <plat/s5pv310.h> | 21 | #include <plat/s5pv310.h> |
22 | #include <plat/sdhci.h> | ||
22 | 23 | ||
23 | #include <mach/regs-irq.h> | 24 | #include <mach/regs-irq.h> |
24 | 25 | ||
@@ -83,6 +84,12 @@ static void s5pv310_idle(void) | |||
83 | void __init s5pv310_map_io(void) | 84 | void __init s5pv310_map_io(void) |
84 | { | 85 | { |
85 | iotable_init(s5pv310_iodesc, ARRAY_SIZE(s5pv310_iodesc)); | 86 | iotable_init(s5pv310_iodesc, ARRAY_SIZE(s5pv310_iodesc)); |
87 | |||
88 | /* initialize device information early */ | ||
89 | s5pv310_default_sdhci0(); | ||
90 | s5pv310_default_sdhci1(); | ||
91 | s5pv310_default_sdhci2(); | ||
92 | s5pv310_default_sdhci3(); | ||
86 | } | 93 | } |
87 | 94 | ||
88 | void __init s5pv310_init_clocks(int xtal) | 95 | void __init s5pv310_init_clocks(int xtal) |
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h index 30844c263d03..d92670ad9897 100644 --- a/arch/arm/plat-samsung/include/plat/sdhci.h +++ b/arch/arm/plat-samsung/include/plat/sdhci.h | |||
@@ -110,6 +110,10 @@ 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 | extern void s5pv210_setup_sdhci3_cfg_gpio(struct platform_device *, int w); | 112 | extern void s5pv210_setup_sdhci3_cfg_gpio(struct platform_device *, int w); |
113 | extern void s5pv310_setup_sdhci0_cfg_gpio(struct platform_device *, int w); | ||
114 | extern void s5pv310_setup_sdhci1_cfg_gpio(struct platform_device *, int w); | ||
115 | extern void s5pv310_setup_sdhci2_cfg_gpio(struct platform_device *, int w); | ||
116 | extern void s5pv310_setup_sdhci3_cfg_gpio(struct platform_device *, int w); | ||
113 | 117 | ||
114 | /* S3C64XX SDHCI setup */ | 118 | /* S3C64XX SDHCI setup */ |
115 | 119 | ||
@@ -288,4 +292,57 @@ static inline void s5pv210_default_sdhci3(void) { } | |||
288 | 292 | ||
289 | #endif /* CONFIG_S5PV210_SETUP_SDHCI */ | 293 | #endif /* CONFIG_S5PV210_SETUP_SDHCI */ |
290 | 294 | ||
295 | /* S5PV310 SDHCI setup */ | ||
296 | #ifdef CONFIG_S5PV310_SETUP_SDHCI | ||
297 | extern char *s5pv310_hsmmc_clksrcs[4]; | ||
298 | |||
299 | extern void s5pv310_setup_sdhci_cfg_card(struct platform_device *dev, | ||
300 | void __iomem *r, | ||
301 | struct mmc_ios *ios, | ||
302 | struct mmc_card *card); | ||
303 | |||
304 | static inline void s5pv310_default_sdhci0(void) | ||
305 | { | ||
306 | #ifdef CONFIG_S3C_DEV_HSMMC | ||
307 | s3c_hsmmc0_def_platdata.clocks = s5pv310_hsmmc_clksrcs; | ||
308 | s3c_hsmmc0_def_platdata.cfg_gpio = s5pv310_setup_sdhci0_cfg_gpio; | ||
309 | s3c_hsmmc0_def_platdata.cfg_card = s5pv310_setup_sdhci_cfg_card; | ||
310 | #endif | ||
311 | } | ||
312 | |||
313 | static inline void s5pv310_default_sdhci1(void) | ||
314 | { | ||
315 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
316 | s3c_hsmmc1_def_platdata.clocks = s5pv310_hsmmc_clksrcs; | ||
317 | s3c_hsmmc1_def_platdata.cfg_gpio = s5pv310_setup_sdhci1_cfg_gpio; | ||
318 | s3c_hsmmc1_def_platdata.cfg_card = s5pv310_setup_sdhci_cfg_card; | ||
319 | #endif | ||
320 | } | ||
321 | |||
322 | static inline void s5pv310_default_sdhci2(void) | ||
323 | { | ||
324 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
325 | s3c_hsmmc2_def_platdata.clocks = s5pv310_hsmmc_clksrcs; | ||
326 | s3c_hsmmc2_def_platdata.cfg_gpio = s5pv310_setup_sdhci2_cfg_gpio; | ||
327 | s3c_hsmmc2_def_platdata.cfg_card = s5pv310_setup_sdhci_cfg_card; | ||
328 | #endif | ||
329 | } | ||
330 | |||
331 | static inline void s5pv310_default_sdhci3(void) | ||
332 | { | ||
333 | #ifdef CONFIG_S3C_DEV_HSMMC3 | ||
334 | s3c_hsmmc3_def_platdata.clocks = s5pv310_hsmmc_clksrcs; | ||
335 | s3c_hsmmc3_def_platdata.cfg_gpio = s5pv310_setup_sdhci3_cfg_gpio; | ||
336 | s3c_hsmmc3_def_platdata.cfg_card = s5pv310_setup_sdhci_cfg_card; | ||
337 | #endif | ||
338 | } | ||
339 | |||
340 | #else | ||
341 | static inline void s5pv310_default_sdhci0(void) { } | ||
342 | static inline void s5pv310_default_sdhci1(void) { } | ||
343 | static inline void s5pv310_default_sdhci2(void) { } | ||
344 | static inline void s5pv310_default_sdhci3(void) { } | ||
345 | |||
346 | #endif /* CONFIG_S5PV310_SETUP_SDHCI */ | ||
347 | |||
291 | #endif /* __PLAT_S3C_SDHCI_H */ | 348 | #endif /* __PLAT_S3C_SDHCI_H */ |