From patchwork Fri Dec 7 09:05:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Grinberg X-Patchwork-Id: 1849211 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id C8549400ED for ; Fri, 7 Dec 2012 09:09:07 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Tgtsl-00033b-Hg; Fri, 07 Dec 2012 09:06:07 +0000 Received: from softlayer.compulab.co.il ([50.23.254.55] helo=compulab.co.il) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Tgtsi-00033I-Dl for linux-arm-kernel@lists.infradead.org; Fri, 07 Dec 2012 09:06:04 +0000 Received: from [62.90.235.247] (port=36144 helo=zimbra-mta.compulab.co.il) by softlayer.compulab.co.il with esmtp (Exim 4.80) (envelope-from ) id 1Tgtsg-0002NX-Rx; Fri, 07 Dec 2012 11:06:03 +0200 Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 3A2AD644195; Fri, 7 Dec 2012 11:06:02 +0200 (IST) X-Virus-Scanned: amavisd-new at compulab.co.il Received: from zimbra-mta.compulab.co.il ([127.0.0.1]) by localhost (zimbra-mta.compulab.co.il [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kSmwrvHeUKQv; Fri, 7 Dec 2012 11:06:01 +0200 (IST) Received: from grinberg-linux (grinberg-pc.compulab.local [10.1.1.13]) by zimbra-mta.compulab.co.il (Postfix) with SMTP id EA7B4644194; Fri, 7 Dec 2012 11:05:59 +0200 (IST) Received: by grinberg-linux (sSMTP sendmail emulation); Fri, 07 Dec 2012 11:05:57 +0200 From: Igor Grinberg To: Tony Lindgren Subject: [PATCH v2] ARM: OMAP3: cm-t3517: add MMC support Date: Fri, 7 Dec 2012 11:05:55 +0200 Message-Id: <1354871155-32528-1-git-send-email-grinberg@compulab.co.il> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1354795206-12048-1-git-send-email-grinberg@compulab.co.il> References: <1354795206-12048-1-git-send-email-grinberg@compulab.co.il> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - softlayer.compulab.co.il X-AntiAbuse: Original Domain - lists.infradead.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - compulab.co.il X-Get-Message-Sender-Via: softlayer.compulab.co.il: acl_c_relayhosts_text_entry: grinberg@compulab.co.il|compulab.co.il X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121207_040604_553002_57BF3CB1 X-CRM114-Status: GOOD ( 13.63 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-omap@vger.kernel.org, Igor Grinberg , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org cm-t3517 uses two MMC interfaces. Add support for both. Signed-off-by: Igor Grinberg --- v2: Use CONFIG_MMC_OMAP_HS instead of plain CONFIG_MMC, so it will be stubbed out with the same defines as omap_hsmmc_init() function. Fix the !CONFIG_MMC_OMAP_HS case. arch/arm/mach-omap2/board-cm-t3517.c | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c index ebbc2ad..792d684 100644 --- a/arch/arm/mach-omap2/board-cm-t3517.c +++ b/arch/arm/mach-omap2/board-cm-t3517.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -46,6 +47,7 @@ #include "mux.h" #include "control.h" +#include "hsmmc.h" #include "common-board-devices.h" #include "am35xx-emac.h" #include "gpmc-nand.h" @@ -121,6 +123,26 @@ static void cm_t3517_init_hecc(void) static inline void cm_t3517_init_hecc(void) {} #endif +#if defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE) +static struct omap2_hsmmc_info cm_t3517_mmc[] = { + { + .mmc = 1, + .caps = MMC_CAP_4_BIT_DATA, + .gpio_cd = 144, + .gpio_wp = 59, + }, + { + .mmc = 2, + .caps = MMC_CAP_4_BIT_DATA, + .gpio_cd = -EINVAL, + .gpio_wp = -EINVAL, + }, + {} /* Terminator */ +}; +#else +#define cm_t3517_mmc NULL +#endif + #if defined(CONFIG_RTC_DRV_V3020) || defined(CONFIG_RTC_DRV_V3020_MODULE) #define RTC_IO_GPIO (153) #define RTC_WR_GPIO (154) @@ -271,6 +293,10 @@ static struct omap_board_mux board_mux[] __initdata = { /* CM-T3517 USB HUB nRESET */ OMAP3_MUX(MCBSP4_CLKX, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), + /* CD - GPIO144 and WP - GPIO59 for MMC1 - SB-T35 */ + OMAP3_MUX(UART2_CTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP), + OMAP3_MUX(GPMC_CLK, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP), + { .reg_offset = OMAP_MUX_TERMINATOR }, }; #endif @@ -286,6 +312,7 @@ static void __init cm_t3517_init(void) cm_t3517_init_usbh(); cm_t3517_init_hecc(); am35xx_emac_init(AM35XX_DEFAULT_MDIO_FREQUENCY, 1); + omap_hsmmc_init(cm_t3517_mmc); } MACHINE_START(CM_T3517, "Compulab CM-T3517")