aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/board-mop500-sdi.c
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2011-08-26 11:54:07 -0400
committerLinus Walleij <linus.walleij@linaro.org>2011-08-30 03:22:57 -0400
commit110c2c2f40647d31994c09f0afd1411e71f48a32 (patch)
treec76703cfaf57605452d29bf0c9f8845d852eb170 /arch/arm/mach-ux500/board-mop500-sdi.c
parent458eef2f4d73a55efa835ed891922e31efe91920 (diff)
mach-ux500: remove most of the ugly machine_is_*() calls
Do more work in the per-machine init calls instead of customizing each init call. Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-ux500/board-mop500-sdi.c')
-rw-r--r--arch/arm/mach-ux500/board-mop500-sdi.c52
1 files changed, 35 insertions, 17 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c
index d0cb9e5eb87c..6826faeecc68 100644
--- a/arch/arm/mach-ux500/board-mop500-sdi.c
+++ b/arch/arm/mach-ux500/board-mop500-sdi.c
@@ -216,30 +216,48 @@ void __init mop500_sdi_init(void)
216 /* PoP:ed eMMC on top of DB8500 v1.0 has problems with high speed */ 216 /* PoP:ed eMMC on top of DB8500 v1.0 has problems with high speed */
217 if (!cpu_is_u8500v10()) 217 if (!cpu_is_u8500v10())
218 mop500_sdi2_data.capabilities |= MMC_CAP_MMC_HIGHSPEED; 218 mop500_sdi2_data.capabilities |= MMC_CAP_MMC_HIGHSPEED;
219 /* sdi2 on snowball is in ATL_B mode for FSMC (LAN) */ 219
220 if (!machine_is_snowball()) 220 db8500_add_sdi2(&mop500_sdi2_data, periphid);
221 db8500_add_sdi2(&mop500_sdi2_data, periphid);
222 221
223 /* On-board eMMC */ 222 /* On-board eMMC */
224 db8500_add_sdi4(&mop500_sdi4_data, periphid); 223 db8500_add_sdi4(&mop500_sdi4_data, periphid);
225 224
226 if (machine_is_hrefv60() || machine_is_snowball()) {
227 if (machine_is_hrefv60()) {
228 mop500_sdi0_data.gpio_cd = HREFV60_SDMMC_CD_GPIO;
229 sdi0_en = HREFV60_SDMMC_EN_GPIO;
230 sdi0_vsel = HREFV60_SDMMC_1V8_3V_GPIO;
231 } else if (machine_is_snowball()) {
232 mop500_sdi0_data.gpio_cd = SNOWBALL_SDMMC_CD_GPIO;
233 mop500_sdi0_data.cd_invert = true;
234 sdi0_en = SNOWBALL_SDMMC_EN_GPIO;
235 sdi0_vsel = SNOWBALL_SDMMC_1V8_3V_GPIO;
236 }
237 sdi0_configure();
238 }
239
240 /* 225 /*
241 * On boards with the TC35892 GPIO expander, sdi0 will finally 226 * On boards with the TC35892 GPIO expander, sdi0 will finally
242 * be added when the TC35892 initializes and calls 227 * be added when the TC35892 initializes and calls
243 * mop500_sdi_tc35892_init() above. 228 * mop500_sdi_tc35892_init() above.
244 */ 229 */
245} 230}
231
232void __init snowball_sdi_init(void)
233{
234 u32 periphid = 0x10480180;
235
236 mop500_sdi2_data.capabilities |= MMC_CAP_MMC_HIGHSPEED;
237
238 /* On-board eMMC */
239 db8500_add_sdi4(&mop500_sdi4_data, periphid);
240
241 mop500_sdi0_data.gpio_cd = SNOWBALL_SDMMC_CD_GPIO;
242 mop500_sdi0_data.cd_invert = true;
243 sdi0_en = SNOWBALL_SDMMC_EN_GPIO;
244 sdi0_vsel = SNOWBALL_SDMMC_1V8_3V_GPIO;
245 sdi0_configure();
246}
247
248void __init hrefv60_sdi_init(void)
249{
250 u32 periphid = 0x10480180;
251
252 mop500_sdi2_data.capabilities |= MMC_CAP_MMC_HIGHSPEED;
253
254 db8500_add_sdi2(&mop500_sdi2_data, periphid);
255
256 /* On-board eMMC */
257 db8500_add_sdi4(&mop500_sdi4_data, periphid);
258
259 mop500_sdi0_data.gpio_cd = HREFV60_SDMMC_CD_GPIO;
260 sdi0_en = HREFV60_SDMMC_EN_GPIO;
261 sdi0_vsel = HREFV60_SDMMC_1V8_3V_GPIO;
262 sdi0_configure();
263}