From patchwork Wed Oct 21 15:48:21 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sekhar Nori X-Patchwork-Id: 55136 Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [192.94.94.40]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9LFmqk5030586 for ; Wed, 21 Oct 2009 15:48:53 GMT Received: from dlep36.itg.ti.com ([157.170.170.91]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id n9LFmpZn017826 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 21 Oct 2009 10:48:52 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id n9LFmpV5006738 for ; Wed, 21 Oct 2009 10:48:51 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id ADE2180690 for ; Wed, 21 Oct 2009 10:48:45 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dbdp31.itg.ti.com (dbdp31.itg.ti.com [172.24.170.98]) by linux.omap.com (Postfix) with ESMTP id 58D558062B for ; Wed, 21 Oct 2009 10:48:27 -0500 (CDT) Received: from psplinux051.india.ti.com (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id n9LFmOaA027400; Wed, 21 Oct 2009 21:18:25 +0530 (IST) Received: from psplinux051.india.ti.com (localhost [127.0.0.1]) by psplinux051.india.ti.com (8.13.1/8.13.1) with ESMTP id n9LFmODY015707; Wed, 21 Oct 2009 21:18:24 +0530 Received: (from a0875516@localhost) by psplinux051.india.ti.com (8.13.1/8.13.1/Submit) id n9LFmOLK015704; Wed, 21 Oct 2009 21:18:24 +0530 From: Sekhar Nori To: davinci-linux-open-source@linux.davincidsp.com Date: Wed, 21 Oct 2009 21:18:21 +0530 Message-Id: <1256140104-15606-2-git-send-email-nsekhar@ti.com> X-Mailer: git-send-email 1.6.2.4 In-Reply-To: <1256140104-15606-1-git-send-email-nsekhar@ti.com> References: <1256140104-15606-1-git-send-email-nsekhar@ti.com> Cc: Subject: [PATCH v2 2/5] davinci: DA830/OMAP-L137 EVM: do not configure NAND on UI card when MMC/SD is selected X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.4 Precedence: list List-Id: davinci-linux-open-source.linux.davincidsp.com List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: davinci-linux-open-source-bounces+patchwork-davinci=patchwork.kernel.org@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces+patchwork-davinci=patchwork.kernel.org@linux.davincidsp.com diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c index 6de058f..4fb0447 100644 --- a/arch/arm/mach-davinci/board-da830-evm.c +++ b/arch/arm/mach-davinci/board-da830-evm.c @@ -253,6 +253,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 */ @@ -348,6 +354,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", @@ -396,6 +409,9 @@ static int da830_evm_ui_expander_setup(struct i2c_client *client, int gpio, { gpio_request(gpio + 6, "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);