aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s3c/include
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2009-03-25 07:01:24 -0400
committerBen Dooks <ben-linux@fluff.org>2009-05-07 06:04:58 -0400
commit4faf6867638cc21aa43b4ca4ed0bdf14a2d29762 (patch)
tree1fed91079785469a6f044900bd322166df37adbf /arch/arm/plat-s3c/include
parente074f9803227236252c8e7be16d836d709abff57 (diff)
[ARM] S3C64XX: Add S3C6400 SDHCI setup support
Add support for S3C6400 SDHCI channels 0 and 1, making the GPIO code common to both S3C6400 and S3C6410. 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.h50
1 files changed, 45 insertions, 5 deletions
diff --git a/arch/arm/plat-s3c/include/plat/sdhci.h b/arch/arm/plat-s3c/include/plat/sdhci.h
index c4ca3920ca4b..f615308ccdfb 100644
--- a/arch/arm/plat-s3c/include/plat/sdhci.h
+++ b/arch/arm/plat-s3c/include/plat/sdhci.h
@@ -67,12 +67,52 @@ extern struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata;
67 67
68/* Helper function availablity */ 68/* Helper function availablity */
69 69
70extern void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
71extern void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
72
73/* S3C6400 SDHCI setup */
74
75#ifdef CONFIG_S3C6400_SETUP_SDHCI
76extern char *s3c6400_hsmmc_clksrcs[4];
77
78#ifdef CONFIG_S3C_DEV_HSMMC
79extern void s3c6400_setup_sdhci_cfg_card(struct platform_device *dev,
80 void __iomem *r,
81 struct mmc_ios *ios,
82 struct mmc_card *card);
83
84static inline void s3c6400_default_sdhci0(void)
85{
86 s3c_hsmmc0_def_platdata.clocks = s3c6400_hsmmc_clksrcs;
87 s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio;
88 s3c_hsmmc0_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card;
89}
90
91#else
92static inline void s3c6400_default_sdhci0(void) { }
93#endif /* CONFIG_S3C_DEV_HSMMC */
94
95#ifdef CONFIG_S3C_DEV_HSMMC1
96static inline void s3c6400_default_sdhci1(void)
97{
98 s3c_hsmmc1_def_platdata.clocks = s3c6400_hsmmc_clksrcs;
99 s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio;
100 s3c_hsmmc1_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card;
101}
102#else
103static inline void s3c6400_default_sdhci1(void) { }
104#endif /* CONFIG_S3C_DEV_HSMMC1 */
105
106#else
107static inline void s3c6400_default_sdhci0(void) { }
108static inline void s3c6400_default_sdhci1(void) { }
109#endif /* CONFIG_S3C6400_SETUP_SDHCI */
110
111/* S3C6410 SDHCI setup */
112
70#ifdef CONFIG_S3C6410_SETUP_SDHCI 113#ifdef CONFIG_S3C6410_SETUP_SDHCI
71extern char *s3c6410_hsmmc_clksrcs[4]; 114extern char *s3c6410_hsmmc_clksrcs[4];
72 115
73extern void s3c6410_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
74extern void s3c6410_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
75
76extern void s3c6410_setup_sdhci0_cfg_card(struct platform_device *dev, 116extern void s3c6410_setup_sdhci0_cfg_card(struct platform_device *dev,
77 void __iomem *r, 117 void __iomem *r,
78 struct mmc_ios *ios, 118 struct mmc_ios *ios,
@@ -82,7 +122,7 @@ extern void s3c6410_setup_sdhci0_cfg_card(struct platform_device *dev,
82static inline void s3c6410_default_sdhci0(void) 122static inline void s3c6410_default_sdhci0(void)
83{ 123{
84 s3c_hsmmc0_def_platdata.clocks = s3c6410_hsmmc_clksrcs; 124 s3c_hsmmc0_def_platdata.clocks = s3c6410_hsmmc_clksrcs;
85 s3c_hsmmc0_def_platdata.cfg_gpio = s3c6410_setup_sdhci0_cfg_gpio; 125 s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio;
86 s3c_hsmmc0_def_platdata.cfg_card = s3c6410_setup_sdhci0_cfg_card; 126 s3c_hsmmc0_def_platdata.cfg_card = s3c6410_setup_sdhci0_cfg_card;
87} 127}
88#else 128#else
@@ -93,7 +133,7 @@ static inline void s3c6410_default_sdhci0(void) { }
93static inline void s3c6410_default_sdhci1(void) 133static inline void s3c6410_default_sdhci1(void)
94{ 134{
95 s3c_hsmmc1_def_platdata.clocks = s3c6410_hsmmc_clksrcs; 135 s3c_hsmmc1_def_platdata.clocks = s3c6410_hsmmc_clksrcs;
96 s3c_hsmmc1_def_platdata.cfg_gpio = s3c6410_setup_sdhci1_cfg_gpio; 136 s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio;
97 s3c_hsmmc1_def_platdata.cfg_card = s3c6410_setup_sdhci0_cfg_card; 137 s3c_hsmmc1_def_platdata.cfg_card = s3c6410_setup_sdhci0_cfg_card;
98} 138}
99#else 139#else