diff options
author | Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com> | 2010-12-17 00:42:09 -0500 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-01-06 00:09:18 -0500 |
commit | c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575 (patch) | |
tree | 8f9a2fc32f7c1a29d29413f71dd84336d45d4eca /arch/arm/plat-samsung | |
parent | 95d6791b4f8aad51caea657236234f21b50a4559 (diff) |
ARM: S3C2416: Add platform helpers for setup SDHCI
Samsung S3C2416 has two SDHCI controllers compatible with other
Samsung's SoCs (S3C64XX, S5PC100 etc...).
Add required platform setup code that the devices can be used with
sdhci-s3c driver.
Signed-off-by: Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com>
[kgene.kim@samsung.com: change to __raw_{readl,writel} from {readl,writel}]
[kgene.kim@samsung.com: build error fixes]
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/plat-samsung')
-rw-r--r-- | arch/arm/plat-samsung/include/plat/sdhci.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h index 85853f8c4c5d..5a41a0b69eec 100644 --- a/arch/arm/plat-samsung/include/plat/sdhci.h +++ b/arch/arm/plat-samsung/include/plat/sdhci.h | |||
@@ -107,6 +107,8 @@ extern struct s3c_sdhci_platdata s3c_hsmmc3_def_platdata; | |||
107 | 107 | ||
108 | /* Helper function availablity */ | 108 | /* Helper function availablity */ |
109 | 109 | ||
110 | extern void s3c2416_setup_sdhci0_cfg_gpio(struct platform_device *, int w); | ||
111 | extern void s3c2416_setup_sdhci1_cfg_gpio(struct platform_device *, int w); | ||
110 | extern void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *, int w); | 112 | extern void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *, int w); |
111 | extern void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *, int w); | 113 | extern void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *, int w); |
112 | extern void s5pc100_setup_sdhci0_cfg_gpio(struct platform_device *, int w); | 114 | extern void s5pc100_setup_sdhci0_cfg_gpio(struct platform_device *, int w); |
@@ -122,6 +124,39 @@ extern void s5pv310_setup_sdhci1_cfg_gpio(struct platform_device *, int w); | |||
122 | extern void s5pv310_setup_sdhci2_cfg_gpio(struct platform_device *, int w); | 124 | extern void s5pv310_setup_sdhci2_cfg_gpio(struct platform_device *, int w); |
123 | extern void s5pv310_setup_sdhci3_cfg_gpio(struct platform_device *, int w); | 125 | extern void s5pv310_setup_sdhci3_cfg_gpio(struct platform_device *, int w); |
124 | 126 | ||
127 | /* S3C2416 SDHCI setup */ | ||
128 | |||
129 | #ifdef CONFIG_S3C2416_SETUP_SDHCI | ||
130 | extern char *s3c2416_hsmmc_clksrcs[4]; | ||
131 | |||
132 | extern void s3c2416_setup_sdhci_cfg_card(struct platform_device *dev, | ||
133 | void __iomem *r, | ||
134 | struct mmc_ios *ios, | ||
135 | struct mmc_card *card); | ||
136 | |||
137 | static inline void s3c2416_default_sdhci0(void) | ||
138 | { | ||
139 | #ifdef CONFIG_S3C_DEV_HSMMC | ||
140 | s3c_hsmmc0_def_platdata.clocks = s3c2416_hsmmc_clksrcs; | ||
141 | s3c_hsmmc0_def_platdata.cfg_gpio = s3c2416_setup_sdhci0_cfg_gpio; | ||
142 | s3c_hsmmc0_def_platdata.cfg_card = s3c2416_setup_sdhci_cfg_card; | ||
143 | #endif /* CONFIG_S3C_DEV_HSMMC */ | ||
144 | } | ||
145 | |||
146 | static inline void s3c2416_default_sdhci1(void) | ||
147 | { | ||
148 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
149 | s3c_hsmmc1_def_platdata.clocks = s3c2416_hsmmc_clksrcs; | ||
150 | s3c_hsmmc1_def_platdata.cfg_gpio = s3c2416_setup_sdhci1_cfg_gpio; | ||
151 | s3c_hsmmc1_def_platdata.cfg_card = s3c2416_setup_sdhci_cfg_card; | ||
152 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ | ||
153 | } | ||
154 | |||
155 | #else | ||
156 | static inline void s3c2416_default_sdhci0(void) { } | ||
157 | static inline void s3c2416_default_sdhci1(void) { } | ||
158 | |||
159 | #endif /* CONFIG_S3C2416_SETUP_SDHCI */ | ||
125 | /* S3C64XX SDHCI setup */ | 160 | /* S3C64XX SDHCI setup */ |
126 | 161 | ||
127 | #ifdef CONFIG_S3C64XX_SETUP_SDHCI | 162 | #ifdef CONFIG_S3C64XX_SETUP_SDHCI |