diff options
author | Kukjin Kim <kgene.kim@samsung.com> | 2010-08-06 08:49:18 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2010-08-06 08:49:18 -0400 |
commit | d61bd77ff1e7c7a0a381c6e656dbc07b37510f37 (patch) | |
tree | 838f7b1c4d931814fbbc30643bb423f409e6daba /arch/arm/plat-samsung/include/plat/sdhci.h | |
parent | f2b7e3c54a304677a1142829fb5913595885379f (diff) | |
parent | 1c739c7f374f77c5a355273c0c1d9345ed08c0ce (diff) |
Merge branch 'next-samsung' into for-next
Conflicts:
arch/arm/mach-s5p6440/Kconfig
arch/arm/mach-s5p6442/Kconfig
arch/arm/mach-s5pc100/Kconfig
arch/arm/mach-s5pv210/Kconfig
arch/arm/mach-s5pv210/cpu.c
arch/arm/plat-samsung/include/plat/sdhci.h
Diffstat (limited to 'arch/arm/plat-samsung/include/plat/sdhci.h')
-rw-r--r-- | arch/arm/plat-samsung/include/plat/sdhci.h | 122 |
1 files changed, 61 insertions, 61 deletions
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h index 10413728530..30844c263d0 100644 --- a/arch/arm/plat-samsung/include/plat/sdhci.h +++ b/arch/arm/plat-samsung/include/plat/sdhci.h | |||
@@ -20,10 +20,31 @@ struct mmc_host; | |||
20 | struct mmc_card; | 20 | struct mmc_card; |
21 | struct mmc_ios; | 21 | struct mmc_ios; |
22 | 22 | ||
23 | enum cd_types { | ||
24 | S3C_SDHCI_CD_INTERNAL, /* use mmc internal CD line */ | ||
25 | S3C_SDHCI_CD_EXTERNAL, /* use external callback */ | ||
26 | S3C_SDHCI_CD_GPIO, /* use external gpio pin for CD line */ | ||
27 | S3C_SDHCI_CD_NONE, /* no CD line, use polling to detect card */ | ||
28 | S3C_SDHCI_CD_PERMANENT, /* no CD line, card permanently wired to host */ | ||
29 | }; | ||
30 | |||
23 | /** | 31 | /** |
24 | * struct s3c_sdhci_platdata() - Platform device data for Samsung SDHCI | 32 | * struct s3c_sdhci_platdata() - Platform device data for Samsung SDHCI |
25 | * @max_width: The maximum number of data bits supported. | 33 | * @max_width: The maximum number of data bits supported. |
26 | * @host_caps: Standard MMC host capabilities bit field. | 34 | * @host_caps: Standard MMC host capabilities bit field. |
35 | * @cd_type: Type of Card Detection method (see cd_types enum above) | ||
36 | * @ext_cd_init: Initialize external card detect subsystem. Called on | ||
37 | * sdhci-s3c driver probe when cd_type == S3C_SDHCI_CD_EXTERNAL. | ||
38 | * notify_func argument is a callback to the sdhci-s3c driver | ||
39 | * that triggers the card detection event. Callback arguments: | ||
40 | * dev is pointer to platform device of the host controller, | ||
41 | * state is new state of the card (0 - removed, 1 - inserted). | ||
42 | * @ext_cd_cleanup: Cleanup external card detect subsystem. Called on | ||
43 | * sdhci-s3c driver remove when cd_type == S3C_SDHCI_CD_EXTERNAL. | ||
44 | * notify_func argument is the same callback as for ext_cd_init. | ||
45 | * @ext_cd_gpio: gpio pin used for external CD line, valid only if | ||
46 | * cd_type == S3C_SDHCI_CD_GPIO | ||
47 | * @ext_cd_gpio_invert: invert values for external CD gpio line | ||
27 | * @cfg_gpio: Configure the GPIO for a specific card bit-width | 48 | * @cfg_gpio: Configure the GPIO for a specific card bit-width |
28 | * @cfg_card: Configure the interface for a specific card and speed. This | 49 | * @cfg_card: Configure the interface for a specific card and speed. This |
29 | * is necessary the controllers and/or GPIO blocks require the | 50 | * is necessary the controllers and/or GPIO blocks require the |
@@ -37,9 +58,17 @@ struct mmc_ios; | |||
37 | struct s3c_sdhci_platdata { | 58 | struct s3c_sdhci_platdata { |
38 | unsigned int max_width; | 59 | unsigned int max_width; |
39 | unsigned int host_caps; | 60 | unsigned int host_caps; |
61 | enum cd_types cd_type; | ||
40 | 62 | ||
41 | char **clocks; /* set of clock sources */ | 63 | char **clocks; /* set of clock sources */ |
42 | 64 | ||
65 | int ext_cd_gpio; | ||
66 | bool ext_cd_gpio_invert; | ||
67 | int (*ext_cd_init)(void (*notify_func)(struct platform_device *, | ||
68 | int state)); | ||
69 | int (*ext_cd_cleanup)(void (*notify_func)(struct platform_device *, | ||
70 | int state)); | ||
71 | |||
43 | void (*cfg_gpio)(struct platform_device *dev, int width); | 72 | void (*cfg_gpio)(struct platform_device *dev, int width); |
44 | void (*cfg_card)(struct platform_device *dev, | 73 | void (*cfg_card)(struct platform_device *dev, |
45 | void __iomem *regbase, | 74 | void __iomem *regbase, |
@@ -58,6 +87,7 @@ struct s3c_sdhci_platdata { | |||
58 | extern void s3c_sdhci0_set_platdata(struct s3c_sdhci_platdata *pd); | 87 | extern void s3c_sdhci0_set_platdata(struct s3c_sdhci_platdata *pd); |
59 | extern void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd); | 88 | extern void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd); |
60 | extern void s3c_sdhci2_set_platdata(struct s3c_sdhci_platdata *pd); | 89 | extern void s3c_sdhci2_set_platdata(struct s3c_sdhci_platdata *pd); |
90 | extern void s3c_sdhci3_set_platdata(struct s3c_sdhci_platdata *pd); | ||
61 | 91 | ||
62 | /* Default platform data, exported so that per-cpu initialisation can | 92 | /* Default platform data, exported so that per-cpu initialisation can |
63 | * set the correct one when there are more than one cpu type selected. | 93 | * set the correct one when there are more than one cpu type selected. |
@@ -66,6 +96,7 @@ extern void s3c_sdhci2_set_platdata(struct s3c_sdhci_platdata *pd); | |||
66 | extern struct s3c_sdhci_platdata s3c_hsmmc0_def_platdata; | 96 | extern struct s3c_sdhci_platdata s3c_hsmmc0_def_platdata; |
67 | extern struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata; | 97 | extern struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata; |
68 | extern struct s3c_sdhci_platdata s3c_hsmmc2_def_platdata; | 98 | extern struct s3c_sdhci_platdata s3c_hsmmc2_def_platdata; |
99 | extern struct s3c_sdhci_platdata s3c_hsmmc3_def_platdata; | ||
69 | 100 | ||
70 | /* Helper function availablity */ | 101 | /* Helper function availablity */ |
71 | 102 | ||
@@ -80,12 +111,11 @@ extern void s5pv210_setup_sdhci1_cfg_gpio(struct platform_device *, int w); | |||
80 | 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); |
81 | 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); |
82 | 113 | ||
83 | /* S3C6400 SDHCI setup */ | 114 | /* S3C64XX SDHCI setup */ |
84 | 115 | ||
85 | #ifdef CONFIG_S3C64XX_SETUP_SDHCI | 116 | #ifdef CONFIG_S3C64XX_SETUP_SDHCI |
86 | extern char *s3c64xx_hsmmc_clksrcs[4]; | 117 | extern char *s3c64xx_hsmmc_clksrcs[4]; |
87 | 118 | ||
88 | #ifdef CONFIG_S3C_DEV_HSMMC | ||
89 | extern void s3c6400_setup_sdhci_cfg_card(struct platform_device *dev, | 119 | extern void s3c6400_setup_sdhci_cfg_card(struct platform_device *dev, |
90 | void __iomem *r, | 120 | void __iomem *r, |
91 | struct mmc_ios *ios, | 121 | struct mmc_ios *ios, |
@@ -93,76 +123,62 @@ extern void s3c6400_setup_sdhci_cfg_card(struct platform_device *dev, | |||
93 | 123 | ||
94 | static inline void s3c6400_default_sdhci0(void) | 124 | static inline void s3c6400_default_sdhci0(void) |
95 | { | 125 | { |
126 | #ifdef CONFIG_S3C_DEV_HSMMC | ||
96 | s3c_hsmmc0_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; | 127 | s3c_hsmmc0_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; |
97 | s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio; | 128 | s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio; |
98 | s3c_hsmmc0_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card; | 129 | s3c_hsmmc0_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card; |
130 | #endif | ||
99 | } | 131 | } |
100 | 132 | ||
101 | #else | ||
102 | static inline void s3c6400_default_sdhci0(void) { } | ||
103 | #endif /* CONFIG_S3C_DEV_HSMMC */ | ||
104 | |||
105 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
106 | static inline void s3c6400_default_sdhci1(void) | 133 | static inline void s3c6400_default_sdhci1(void) |
107 | { | 134 | { |
135 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
108 | s3c_hsmmc1_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; | 136 | s3c_hsmmc1_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; |
109 | s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio; | 137 | s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio; |
110 | s3c_hsmmc1_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card; | 138 | s3c_hsmmc1_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card; |
139 | #endif | ||
111 | } | 140 | } |
112 | #else | ||
113 | static inline void s3c6400_default_sdhci1(void) { } | ||
114 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ | ||
115 | 141 | ||
116 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
117 | static inline void s3c6400_default_sdhci2(void) | 142 | static inline void s3c6400_default_sdhci2(void) |
118 | { | 143 | { |
144 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
119 | s3c_hsmmc2_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; | 145 | s3c_hsmmc2_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; |
120 | s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio; | 146 | s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio; |
121 | s3c_hsmmc2_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card; | 147 | s3c_hsmmc2_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card; |
148 | #endif | ||
122 | } | 149 | } |
123 | #else | ||
124 | static inline void s3c6400_default_sdhci2(void) { } | ||
125 | #endif /* CONFIG_S3C_DEV_HSMMC2 */ | ||
126 | |||
127 | /* S3C6410 SDHCI setup */ | ||
128 | 150 | ||
129 | extern void s3c6410_setup_sdhci_cfg_card(struct platform_device *dev, | 151 | extern void s3c6410_setup_sdhci_cfg_card(struct platform_device *dev, |
130 | void __iomem *r, | 152 | void __iomem *r, |
131 | struct mmc_ios *ios, | 153 | struct mmc_ios *ios, |
132 | struct mmc_card *card); | 154 | struct mmc_card *card); |
133 | 155 | ||
134 | #ifdef CONFIG_S3C_DEV_HSMMC | ||
135 | static inline void s3c6410_default_sdhci0(void) | 156 | static inline void s3c6410_default_sdhci0(void) |
136 | { | 157 | { |
158 | #ifdef CONFIG_S3C_DEV_HSMMC | ||
137 | s3c_hsmmc0_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; | 159 | s3c_hsmmc0_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; |
138 | s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio; | 160 | s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio; |
139 | s3c_hsmmc0_def_platdata.cfg_card = s3c6410_setup_sdhci_cfg_card; | 161 | s3c_hsmmc0_def_platdata.cfg_card = s3c6410_setup_sdhci_cfg_card; |
162 | #endif | ||
140 | } | 163 | } |
141 | #else | ||
142 | static inline void s3c6410_default_sdhci0(void) { } | ||
143 | #endif /* CONFIG_S3C_DEV_HSMMC */ | ||
144 | 164 | ||
145 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
146 | static inline void s3c6410_default_sdhci1(void) | 165 | static inline void s3c6410_default_sdhci1(void) |
147 | { | 166 | { |
167 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
148 | s3c_hsmmc1_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; | 168 | s3c_hsmmc1_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; |
149 | s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio; | 169 | s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio; |
150 | s3c_hsmmc1_def_platdata.cfg_card = s3c6410_setup_sdhci_cfg_card; | 170 | s3c_hsmmc1_def_platdata.cfg_card = s3c6410_setup_sdhci_cfg_card; |
171 | #endif | ||
151 | } | 172 | } |
152 | #else | ||
153 | static inline void s3c6410_default_sdhci1(void) { } | ||
154 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ | ||
155 | 173 | ||
156 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
157 | static inline void s3c6410_default_sdhci2(void) | 174 | static inline void s3c6410_default_sdhci2(void) |
158 | { | 175 | { |
176 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
159 | s3c_hsmmc2_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; | 177 | s3c_hsmmc2_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; |
160 | s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio; | 178 | s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio; |
161 | s3c_hsmmc2_def_platdata.cfg_card = s3c6410_setup_sdhci_cfg_card; | 179 | s3c_hsmmc2_def_platdata.cfg_card = s3c6410_setup_sdhci_cfg_card; |
180 | #endif | ||
162 | } | 181 | } |
163 | #else | ||
164 | static inline void s3c6410_default_sdhci2(void) { } | ||
165 | #endif /* CONFIG_S3C_DEV_HSMMC2 */ | ||
166 | 182 | ||
167 | #else | 183 | #else |
168 | static inline void s3c6410_default_sdhci0(void) { } | 184 | static inline void s3c6410_default_sdhci0(void) { } |
@@ -184,48 +200,42 @@ extern void s5pc100_setup_sdhci0_cfg_card(struct platform_device *dev, | |||
184 | struct mmc_ios *ios, | 200 | struct mmc_ios *ios, |
185 | struct mmc_card *card); | 201 | struct mmc_card *card); |
186 | 202 | ||
187 | #ifdef CONFIG_S3C_DEV_HSMMC | ||
188 | static inline void s5pc100_default_sdhci0(void) | 203 | static inline void s5pc100_default_sdhci0(void) |
189 | { | 204 | { |
205 | #ifdef CONFIG_S3C_DEV_HSMMC | ||
190 | s3c_hsmmc0_def_platdata.clocks = s5pc100_hsmmc_clksrcs; | 206 | s3c_hsmmc0_def_platdata.clocks = s5pc100_hsmmc_clksrcs; |
191 | s3c_hsmmc0_def_platdata.cfg_gpio = s5pc100_setup_sdhci0_cfg_gpio; | 207 | s3c_hsmmc0_def_platdata.cfg_gpio = s5pc100_setup_sdhci0_cfg_gpio; |
192 | s3c_hsmmc0_def_platdata.cfg_card = s5pc100_setup_sdhci0_cfg_card; | 208 | s3c_hsmmc0_def_platdata.cfg_card = s5pc100_setup_sdhci0_cfg_card; |
209 | #endif | ||
193 | } | 210 | } |
194 | #else | ||
195 | static inline void s5pc100_default_sdhci0(void) { } | ||
196 | #endif /* CONFIG_S3C_DEV_HSMMC */ | ||
197 | 211 | ||
198 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
199 | static inline void s5pc100_default_sdhci1(void) | 212 | static inline void s5pc100_default_sdhci1(void) |
200 | { | 213 | { |
214 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
201 | s3c_hsmmc1_def_platdata.clocks = s5pc100_hsmmc_clksrcs; | 215 | s3c_hsmmc1_def_platdata.clocks = s5pc100_hsmmc_clksrcs; |
202 | s3c_hsmmc1_def_platdata.cfg_gpio = s5pc100_setup_sdhci1_cfg_gpio; | 216 | s3c_hsmmc1_def_platdata.cfg_gpio = s5pc100_setup_sdhci1_cfg_gpio; |
203 | s3c_hsmmc1_def_platdata.cfg_card = s5pc100_setup_sdhci0_cfg_card; | 217 | s3c_hsmmc1_def_platdata.cfg_card = s5pc100_setup_sdhci0_cfg_card; |
218 | #endif | ||
204 | } | 219 | } |
205 | #else | ||
206 | static inline void s5pc100_default_sdhci1(void) { } | ||
207 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ | ||
208 | 220 | ||
209 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
210 | static inline void s5pc100_default_sdhci2(void) | 221 | static inline void s5pc100_default_sdhci2(void) |
211 | { | 222 | { |
223 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
212 | s3c_hsmmc2_def_platdata.clocks = s5pc100_hsmmc_clksrcs; | 224 | s3c_hsmmc2_def_platdata.clocks = s5pc100_hsmmc_clksrcs; |
213 | s3c_hsmmc2_def_platdata.cfg_gpio = s5pc100_setup_sdhci2_cfg_gpio; | 225 | s3c_hsmmc2_def_platdata.cfg_gpio = s5pc100_setup_sdhci2_cfg_gpio; |
214 | s3c_hsmmc2_def_platdata.cfg_card = s5pc100_setup_sdhci0_cfg_card; | 226 | s3c_hsmmc2_def_platdata.cfg_card = s5pc100_setup_sdhci0_cfg_card; |
227 | #endif | ||
215 | } | 228 | } |
216 | #else | ||
217 | static inline void s5pc100_default_sdhci2(void) { } | ||
218 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ | ||
219 | |||
220 | 229 | ||
221 | #else | 230 | #else |
222 | static inline void s5pc100_default_sdhci0(void) { } | 231 | static inline void s5pc100_default_sdhci0(void) { } |
223 | static inline void s5pc100_default_sdhci1(void) { } | 232 | static inline void s5pc100_default_sdhci1(void) { } |
224 | static inline void s5pc100_default_sdhci2(void) { } | 233 | static inline void s5pc100_default_sdhci2(void) { } |
234 | |||
225 | #endif /* CONFIG_S5PC100_SETUP_SDHCI */ | 235 | #endif /* CONFIG_S5PC100_SETUP_SDHCI */ |
226 | 236 | ||
237 | /* S5PV210 SDHCI setup */ | ||
227 | 238 | ||
228 | /* S5PC110 SDHCI setup */ | ||
229 | #ifdef CONFIG_S5PV210_SETUP_SDHCI | 239 | #ifdef CONFIG_S5PV210_SETUP_SDHCI |
230 | extern char *s5pv210_hsmmc_clksrcs[4]; | 240 | extern char *s5pv210_hsmmc_clksrcs[4]; |
231 | 241 | ||
@@ -234,58 +244,48 @@ extern void s5pv210_setup_sdhci_cfg_card(struct platform_device *dev, | |||
234 | struct mmc_ios *ios, | 244 | struct mmc_ios *ios, |
235 | struct mmc_card *card); | 245 | struct mmc_card *card); |
236 | 246 | ||
237 | #ifdef CONFIG_S3C_DEV_HSMMC | ||
238 | static inline void s5pv210_default_sdhci0(void) | 247 | static inline void s5pv210_default_sdhci0(void) |
239 | { | 248 | { |
249 | #ifdef CONFIG_S3C_DEV_HSMMC | ||
240 | s3c_hsmmc0_def_platdata.clocks = s5pv210_hsmmc_clksrcs; | 250 | s3c_hsmmc0_def_platdata.clocks = s5pv210_hsmmc_clksrcs; |
241 | s3c_hsmmc0_def_platdata.cfg_gpio = s5pv210_setup_sdhci0_cfg_gpio; | 251 | s3c_hsmmc0_def_platdata.cfg_gpio = s5pv210_setup_sdhci0_cfg_gpio; |
242 | s3c_hsmmc0_def_platdata.cfg_card = s5pv210_setup_sdhci_cfg_card; | 252 | s3c_hsmmc0_def_platdata.cfg_card = s5pv210_setup_sdhci_cfg_card; |
253 | #endif | ||
243 | } | 254 | } |
244 | #else | ||
245 | static inline void s5pv210_default_sdhci0(void) { } | ||
246 | #endif /* CONFIG_S3C_DEV_HSMMC */ | ||
247 | 255 | ||
248 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
249 | static inline void s5pv210_default_sdhci1(void) | 256 | static inline void s5pv210_default_sdhci1(void) |
250 | { | 257 | { |
258 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
251 | s3c_hsmmc1_def_platdata.clocks = s5pv210_hsmmc_clksrcs; | 259 | s3c_hsmmc1_def_platdata.clocks = s5pv210_hsmmc_clksrcs; |
252 | s3c_hsmmc1_def_platdata.cfg_gpio = s5pv210_setup_sdhci1_cfg_gpio; | 260 | s3c_hsmmc1_def_platdata.cfg_gpio = s5pv210_setup_sdhci1_cfg_gpio; |
253 | s3c_hsmmc1_def_platdata.cfg_card = s5pv210_setup_sdhci_cfg_card; | 261 | s3c_hsmmc1_def_platdata.cfg_card = s5pv210_setup_sdhci_cfg_card; |
262 | #endif | ||
254 | } | 263 | } |
255 | #else | ||
256 | static inline void s5pv210_default_sdhci1(void) { } | ||
257 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ | ||
258 | 264 | ||
259 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
260 | static inline void s5pv210_default_sdhci2(void) | 265 | static inline void s5pv210_default_sdhci2(void) |
261 | { | 266 | { |
267 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
262 | s3c_hsmmc2_def_platdata.clocks = s5pv210_hsmmc_clksrcs; | 268 | s3c_hsmmc2_def_platdata.clocks = s5pv210_hsmmc_clksrcs; |
263 | s3c_hsmmc2_def_platdata.cfg_gpio = s5pv210_setup_sdhci2_cfg_gpio; | 269 | s3c_hsmmc2_def_platdata.cfg_gpio = s5pv210_setup_sdhci2_cfg_gpio; |
264 | s3c_hsmmc2_def_platdata.cfg_card = s5pv210_setup_sdhci_cfg_card; | 270 | s3c_hsmmc2_def_platdata.cfg_card = s5pv210_setup_sdhci_cfg_card; |
271 | #endif | ||
265 | } | 272 | } |
266 | #else | ||
267 | static inline void s5pv210_default_sdhci2(void) { } | ||
268 | #endif /* CONFIG_S3C_DEV_HSMMC2 */ | ||
269 | 273 | ||
270 | #ifdef CONFIG_S3C_DEV_HSMMC3 | ||
271 | static inline void s5pv210_default_sdhci3(void) | 274 | static inline void s5pv210_default_sdhci3(void) |
272 | { | 275 | { |
276 | #ifdef CONFIG_S3C_DEV_HSMMC3 | ||
273 | s3c_hsmmc3_def_platdata.clocks = s5pv210_hsmmc_clksrcs; | 277 | s3c_hsmmc3_def_platdata.clocks = s5pv210_hsmmc_clksrcs; |
274 | s3c_hsmmc3_def_platdata.cfg_gpio = s5pv210_setup_sdhci3_cfg_gpio; | 278 | s3c_hsmmc3_def_platdata.cfg_gpio = s5pv210_setup_sdhci3_cfg_gpio; |
275 | s3c_hsmmc3_def_platdata.cfg_card = s5pv210_setup_sdhci_cfg_card; | 279 | s3c_hsmmc3_def_platdata.cfg_card = s5pv210_setup_sdhci_cfg_card; |
280 | #endif | ||
276 | } | 281 | } |
277 | #else | ||
278 | static inline void s5pv210_default_sdhci3(void) { } | ||
279 | #endif /* CONFIG_S3C_DEV_HSMMC3 */ | ||
280 | 282 | ||
281 | #else | 283 | #else |
282 | static inline void s5pv210_default_sdhci0(void) { } | 284 | static inline void s5pv210_default_sdhci0(void) { } |
283 | static inline void s5pv210_default_sdhci1(void) { } | 285 | static inline void s5pv210_default_sdhci1(void) { } |
284 | static inline void s5pv210_default_sdhci2(void) { } | 286 | static inline void s5pv210_default_sdhci2(void) { } |
285 | static inline void s5pv210_default_sdhci3(void) { } | 287 | static inline void s5pv210_default_sdhci3(void) { } |
286 | #endif /* CONFIG_S5PC100_SETUP_SDHCI */ | ||
287 | |||
288 | |||
289 | 288 | ||
289 | #endif /* CONFIG_S5PV210_SETUP_SDHCI */ | ||
290 | 290 | ||
291 | #endif /* __PLAT_S3C_SDHCI_H */ | 291 | #endif /* __PLAT_S3C_SDHCI_H */ |