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: 1844731 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 453783FCA5 for ; Thu, 6 Dec 2012 12:00:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751419Ab2LFMAR (ORCPT ); Thu, 6 Dec 2012 07:00:17 -0500 Received: from softlayer.compulab.co.il ([50.23.254.55]:36227 "EHLO compulab.co.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750826Ab2LFMAQ (ORCPT ); Thu, 6 Dec 2012 07:00:16 -0500 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 Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Igor Grinberg 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 - vger.kernel.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 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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")