Commit 820c4fe3 authored by Sudhakar Rajashekhara's avatar Sudhakar Rajashekhara Committed by Kevin Hilman

davinci: Handle pinmux conflict between mmc/sd and nor flash

On DA850/OMAP-L138 EVM, MMC/SD and NOR Flash share
some of the AEMIF pins. This patch prints out a warning
during booting, if both MMC/SD and NOR Flash are enabled
in kernel menuconfig.

If both MMC/SD and NOR Flash are enabled, only MMC/SD
will work correctly.
Signed-off-by: default avatarSudhakar Rajashekhara <sudhakar.raj@ti.com>
Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
parent 7c5ec609
...@@ -244,6 +244,20 @@ static void __init da850_evm_init_nor(void) ...@@ -244,6 +244,20 @@ static void __init da850_evm_init_nor(void)
iounmap(aemif_addr); iounmap(aemif_addr);
} }
#if defined(CONFIG_MTD_PHYSMAP) || \
defined(CONFIG_MTD_PHYSMAP_MODULE)
#define HAS_NOR 1
#else
#define HAS_NOR 0
#endif
#if defined(CONFIG_MMC_DAVINCI) || \
defined(CONFIG_MMC_DAVINCI_MODULE)
#define HAS_MMC 1
#else
#define HAS_MMC 0
#endif
static __init void da850_evm_init(void) static __init void da850_evm_init(void)
{ {
struct davinci_soc_info *soc_info = &davinci_soc_info; struct davinci_soc_info *soc_info = &davinci_soc_info;
...@@ -298,10 +312,16 @@ static __init void da850_evm_init(void) ...@@ -298,10 +312,16 @@ static __init void da850_evm_init(void)
pr_warning("da830_evm_init: watchdog registration failed: %d\n", pr_warning("da830_evm_init: watchdog registration failed: %d\n",
ret); ret);
if (HAS_MMC) {
if (HAS_NOR)
pr_warning("WARNING: both NOR Flash and MMC/SD are "
"enabled, but they share AEMIF pins.\n"
"\tDisable one of them.\n");
ret = da8xx_pinmux_setup(da850_mmcsd0_pins); ret = da8xx_pinmux_setup(da850_mmcsd0_pins);
if (ret) if (ret)
pr_warning("da850_evm_init: mmcsd0 mux setup failed: %d\n", pr_warning("da850_evm_init: mmcsd0 mux setup failed:"
ret); " %d\n", ret);
ret = gpio_request(DA850_MMCSD_CD_PIN, "MMC CD\n"); ret = gpio_request(DA850_MMCSD_CD_PIN, "MMC CD\n");
if (ret) if (ret)
...@@ -317,8 +337,9 @@ static __init void da850_evm_init(void) ...@@ -317,8 +337,9 @@ static __init void da850_evm_init(void)
ret = da8xx_register_mmcsd0(&da850_mmc_config); ret = da8xx_register_mmcsd0(&da850_mmc_config);
if (ret) if (ret)
pr_warning("da850_evm_init: mmcsd0 registration failed: %d\n", pr_warning("da850_evm_init: mmcsd0 registration failed:"
ret); " %d\n", ret);
}
davinci_serial_init(&da850_evm_uart_config); davinci_serial_init(&da850_evm_uart_config);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment