From patchwork Mon Jun 13 17:31:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Silva X-Patchwork-Id: 875952 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5DHRPbq003003 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 13 Jun 2011 17:27:46 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QWAuv-00034M-8x; Mon, 13 Jun 2011 17:27:13 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QWAuu-0003Ao-Rp; Mon, 13 Jun 2011 17:27:12 +0000 Received: from ch1ehsobe003.messaging.microsoft.com ([216.32.181.183] helo=CH1EHSOBE011.bigfish.com) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QWAur-0003AV-4t for linux-arm-kernel@lists.infradead.org; Mon, 13 Jun 2011 17:27:10 +0000 Received: from mail23-ch1-R.bigfish.com (216.32.181.168) by CH1EHSOBE011.bigfish.com (10.43.70.61) with Microsoft SMTP Server id 14.1.225.22; Mon, 13 Jun 2011 17:27:06 +0000 Received: from mail23-ch1 (localhost.localdomain [127.0.0.1]) by mail23-ch1-R.bigfish.com (Postfix) with ESMTP id 8AE211903EF; Mon, 13 Jun 2011 17:27:06 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839h61h) X-Spam-TCS-SCL: 0:0 X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPVD:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail23-ch1 (localhost.localdomain [127.0.0.1]) by mail23-ch1 (MessageSwitch) id 1307985952660975_24699; Mon, 13 Jun 2011 17:25:52 +0000 (UTC) Received: from CH1EHSMHS009.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.254]) by mail23-ch1.bigfish.com (Postfix) with ESMTP id 4935D23B809F; Mon, 13 Jun 2011 17:25:17 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS009.bigfish.com (10.43.70.9) with Microsoft SMTP Server (TLS) id 14.1.225.22; Mon, 13 Jun 2011 17:25:16 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server id 14.1.289.8; Mon, 13 Jun 2011 12:25:15 -0500 Received: from freescale.am.freescale.net ([10.29.240.185]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id p5DHPDtQ003014; Mon, 13 Jun 2011 12:25:14 -0500 (CDT) From: Andre Silva To: Subject: [PATCH 1/2] ARM:mach-mx5/mx53_ard: Add ESDHC support Date: Mon, 13 Jun 2011 14:31:57 -0300 Message-ID: <1307986318-16324-1-git-send-email-andre.silva@freescale.com> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110613_132709_313957_D7C0DA49 X-CRM114-Status: GOOD ( 16.41 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [216.32.181.183 listed in list.dnswl.org] Cc: Andre Silva , kernel@pengutronix.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 13 Jun 2011 17:27:46 +0000 (UTC) Signed-off-by: Andre Silva --- arch/arm/mach-mx5/Kconfig | 1 + arch/arm/mach-mx5/board-mx53_ard.c | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig index 695cdf0..9a8e6f8 100644 --- a/arch/arm/mach-mx5/Kconfig +++ b/arch/arm/mach-mx5/Kconfig @@ -213,6 +213,7 @@ config MACH_MX53_ARD bool "Support MX53 ARD platforms" select SOC_IMX53 select IMX_HAVE_PLATFORM_IMX_UART + select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX help Include support for MX53 ARD platform. This includes specific configurations for the board and its peripherals. diff --git a/arch/arm/mach-mx5/board-mx53_ard.c b/arch/arm/mach-mx5/board-mx53_ard.c index 7e1859b..6049fda 100644 --- a/arch/arm/mach-mx5/board-mx53_ard.c +++ b/arch/arm/mach-mx5/board-mx53_ard.c @@ -36,6 +36,8 @@ #include "devices-imx53.h" #define ARD_ETHERNET_INT_B IMX_GPIO_NR(2, 31) +#define ARD_SD1_CD IMX_GPIO_NR(1, 1) +#define ARD_SD1_WP IMX_GPIO_NR(1, 9) static iomux_v3_cfg_t mx53_ard_pads[] = { /* UART1 */ @@ -69,6 +71,19 @@ static iomux_v3_cfg_t mx53_ard_pads[] = { MX53_PAD_EIM_OE__EMI_WEIM_OE, MX53_PAD_EIM_RW__EMI_WEIM_RW, MX53_PAD_EIM_CS1__EMI_WEIM_CS_1, + /* SDHC1 */ + MX53_PAD_SD1_CMD__ESDHC1_CMD, + MX53_PAD_SD1_CLK__ESDHC1_CLK, + MX53_PAD_SD1_DATA0__ESDHC1_DAT0, + MX53_PAD_SD1_DATA1__ESDHC1_DAT1, + MX53_PAD_SD1_DATA2__ESDHC1_DAT2, + MX53_PAD_SD1_DATA3__ESDHC1_DAT3, + MX53_PAD_PATA_DATA8__ESDHC1_DAT4, + MX53_PAD_PATA_DATA9__ESDHC1_DAT5, + MX53_PAD_PATA_DATA10__ESDHC1_DAT6, + MX53_PAD_PATA_DATA11__ESDHC1_DAT7, + MX53_PAD_GPIO_1__GPIO1_1, + MX53_PAD_GPIO_9__GPIO1_9, }; static struct resource ard_smsc911x_resources[] = { @@ -100,6 +115,11 @@ static struct platform_device ard_smsc_lan9220_device = { }, }; +static const struct esdhc_platform_data mx53_ard_sd1_data __initconst = { + .cd_gpio = ARD_SD1_CD, + .wp_gpio = ARD_SD1_WP, +}; + static void __init mx53_ard_io_init(void) { mxc_iomux_v3_setup_multiple_pads(mx53_ard_pads, @@ -156,6 +176,8 @@ static void __init mx53_ard_board_init(void) mx53_ard_io_init(); weim_cs_config(); platform_add_devices(devices, ARRAY_SIZE(devices)); + + imx53_add_sdhci_esdhc_imx(0, &mx53_ard_sd1_data); } static void __init mx53_ard_timer_init(void)