From patchwork Thu Dec 6 12:00:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Grinberg X-Patchwork-Id: 1844741 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 999F1DF2F9 for ; Thu, 6 Dec 2012 12:03:53 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Tga7q-0003F0-Po; Thu, 06 Dec 2012 12:00:22 +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 1Tga7m-0003Ee-7i for linux-arm-kernel@lists.infradead.org; Thu, 06 Dec 2012 12:00:19 +0000 Received: from [62.90.235.247] (port=29082 helo=zimbra-mta.compulab.co.il) by softlayer.compulab.co.il with esmtp (Exim 4.80) (envelope-from ) id 1Tga7h-0005v4-Lw; Thu, 06 Dec 2012 14:00:14 +0200 Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 09E97644195; Thu, 6 Dec 2012 14:00:13 +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 cyoc6-Bdr0pP; Thu, 6 Dec 2012 14:00:12 +0200 (IST) Received: from grinberg-linux (grinberg-pc.compulab.local [10.1.1.13]) by zimbra-mta.compulab.co.il (Postfix) with SMTP id 81008644194; Thu, 6 Dec 2012 14:00:11 +0200 (IST) Received: by grinberg-linux (sSMTP sendmail emulation); Thu, 06 Dec 2012 14:00:07 +0200 From: Igor Grinberg To: Tony Lindgren Subject: [PATCH] ARM: OMAP3: cm-t3517: add MMC support Date: Thu, 6 Dec 2012 14:00:06 +0200 Message-Id: <1354795206-12048-1-git-send-email-grinberg@compulab.co.il> X-Mailer: git-send-email 1.7.3.4 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-20121206_070018_369066_7B8E08FA X-CRM114-Status: GOOD ( 12.96 ) 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 --- arch/arm/mach-omap2/board-cm-t3517.c | 25 +++++++++++++++++++++++++ 1 files changed, 25 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..fb1f993 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,24 @@ static void cm_t3517_init_hecc(void) static inline void cm_t3517_init_hecc(void) {} #endif +#if defined(CONFIG_MMC) || defined(CONFIG_MMC_MODULE) +static struct omap2_hsmmc_info 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 */ +}; +#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 +291,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 +310,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(mmc); } MACHINE_START(CM_T3517, "Compulab CM-T3517")