aboutsummaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorSekhar Nori <nsekhar@ti.com>2009-10-21 21:18:21 +0530
committerKevin Hilman <khilman@deeprootsystems.com>2009-11-25 10:21:35 -0800
commitb5ebe4e198e595cad412a9de2d7b253693545d30 (patch)
tree70723cb07fe43cfb074e9a84dffba32db5d4c4c5 /arch/arm
parent77316f0575264c56fb0c8f241b946a91e3a00602 (diff)
davinci: DA830/OMAP-L137 EVM: do not configure NAND on UI card when MMC/SD is selected
On the DA830, AEMIF and MMC/SD pins are shared. On the EVM, when the mux_mode signal is low MMC/SD works and when mux_mode signal is high, NAND works. When MMC/SD driver is configured in the kernel, do not let NAND get registered and drive mux_mode high. Instead, print a warning for user to understand why the platform device for NAND did not get registered. Signed-off-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-davinci/board-da830-evm.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
index e7e97c90d4d..537a048c84b 100644
--- a/arch/arm/mach-davinci/board-da830-evm.c
+++ b/arch/arm/mach-davinci/board-da830-evm.c
@@ -282,6 +282,12 @@ static const short da830_evm_emif25_pins[] = {
-1
};
+#if defined(CONFIG_MMC_DAVINCI) || defined(CONFIG_MMC_DAVINCI_MODULE)
+#define HAS_MMC 1
+#else
+#define HAS_MMC 0
+#endif
+
#ifdef CONFIG_DA830_UI_NAND
static struct mtd_partition da830_evm_nand_partitions[] = {
/* bootloader (U-Boot, etc) in first sector */
@@ -377,6 +383,13 @@ static inline void da830_evm_init_nand(int mux_mode)
{
int ret;
+ if (HAS_MMC) {
+ pr_warning("WARNING: both MMC/SD and NAND are "
+ "enabled, but they share AEMIF pins.\n"
+ "\tDisable MMC/SD for NAND support.\n");
+ return;
+ }
+
ret = da8xx_pinmux_setup(da830_evm_emif25_pins);
if (ret)
pr_warning("da830_evm_init: emif25 mux setup failed: %d\n",
@@ -425,6 +438,9 @@ static int da830_evm_ui_expander_setup(struct i2c_client *client, int gpio,
{
gpio_request(gpio + 6, "UI MUX_MODE");
+ /* Drive mux mode low to match the default without UI card */
+ gpio_direction_output(gpio + 6, 0);
+
da830_evm_init_lcdc(gpio + 6);
da830_evm_init_nand(gpio + 6);