aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-davinci/board-da850-evm.c63
1 files changed, 42 insertions, 21 deletions
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index 70a2f487da95..f2946a0cf6f6 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -244,6 +244,20 @@ static void __init da850_evm_init_nor(void)
244 iounmap(aemif_addr); 244 iounmap(aemif_addr);
245} 245}
246 246
247#if defined(CONFIG_MTD_PHYSMAP) || \
248 defined(CONFIG_MTD_PHYSMAP_MODULE)
249#define HAS_NOR 1
250#else
251#define HAS_NOR 0
252#endif
253
254#if defined(CONFIG_MMC_DAVINCI) || \
255 defined(CONFIG_MMC_DAVINCI_MODULE)
256#define HAS_MMC 1
257#else
258#define HAS_MMC 0
259#endif
260
247static __init void da850_evm_init(void) 261static __init void da850_evm_init(void)
248{ 262{
249 struct davinci_soc_info *soc_info = &davinci_soc_info; 263 struct davinci_soc_info *soc_info = &davinci_soc_info;
@@ -298,27 +312,34 @@ static __init void da850_evm_init(void)
298 pr_warning("da830_evm_init: watchdog registration failed: %d\n", 312 pr_warning("da830_evm_init: watchdog registration failed: %d\n",
299 ret); 313 ret);
300 314
301 ret = da8xx_pinmux_setup(da850_mmcsd0_pins); 315 if (HAS_MMC) {
302 if (ret) 316 if (HAS_NOR)
303 pr_warning("da850_evm_init: mmcsd0 mux setup failed: %d\n", 317 pr_warning("WARNING: both NOR Flash and MMC/SD are "
304 ret); 318 "enabled, but they share AEMIF pins.\n"
305 319 "\tDisable one of them.\n");
306 ret = gpio_request(DA850_MMCSD_CD_PIN, "MMC CD\n"); 320
307 if (ret) 321 ret = da8xx_pinmux_setup(da850_mmcsd0_pins);
308 pr_warning("da850_evm_init: can not open GPIO %d\n", 322 if (ret)
309 DA850_MMCSD_CD_PIN); 323 pr_warning("da850_evm_init: mmcsd0 mux setup failed:"
310 gpio_direction_input(DA850_MMCSD_CD_PIN); 324 " %d\n", ret);
311 325
312 ret = gpio_request(DA850_MMCSD_WP_PIN, "MMC WP\n"); 326 ret = gpio_request(DA850_MMCSD_CD_PIN, "MMC CD\n");
313 if (ret) 327 if (ret)
314 pr_warning("da850_evm_init: can not open GPIO %d\n", 328 pr_warning("da850_evm_init: can not open GPIO %d\n",
315 DA850_MMCSD_WP_PIN); 329 DA850_MMCSD_CD_PIN);
316 gpio_direction_input(DA850_MMCSD_WP_PIN); 330 gpio_direction_input(DA850_MMCSD_CD_PIN);
317 331
318 ret = da8xx_register_mmcsd0(&da850_mmc_config); 332 ret = gpio_request(DA850_MMCSD_WP_PIN, "MMC WP\n");
319 if (ret) 333 if (ret)
320 pr_warning("da850_evm_init: mmcsd0 registration failed: %d\n", 334 pr_warning("da850_evm_init: can not open GPIO %d\n",
321 ret); 335 DA850_MMCSD_WP_PIN);
336 gpio_direction_input(DA850_MMCSD_WP_PIN);
337
338 ret = da8xx_register_mmcsd0(&da850_mmc_config);
339 if (ret)
340 pr_warning("da850_evm_init: mmcsd0 registration failed:"
341 " %d\n", ret);
342 }
322 343
323 davinci_serial_init(&da850_evm_uart_config); 344 davinci_serial_init(&da850_evm_uart_config);
324 345