From patchwork Tue Feb 22 12:58:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 580291 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1MCwTXZ007204 for ; Tue, 22 Feb 2011 12:58:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752094Ab1BVM63 (ORCPT ); Tue, 22 Feb 2011 07:58:29 -0500 Received: from metis.ext.pengutronix.de ([92.198.50.35]:55303 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752146Ab1BVM61 (ORCPT ); Tue, 22 Feb 2011 07:58:27 -0500 Received: from katana.hi.pengutronix.de ([2001:6f8:1178:2:221:70ff:fe71:1890] helo=pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1Prrow-0004aB-G4; Tue, 22 Feb 2011 13:58:26 +0100 From: Wolfram Sang To: linux-mmc@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, =?UTF-8?q?Eric=20B=C3=A9nard?= , Wolfram Sang Subject: [PATCH 4/5] arm: mach-mx3: pcm043: add write-protect and card-detect for SD1 Date: Tue, 22 Feb 2011 13:58:19 +0100 Message-Id: <1298379500-27590-5-git-send-email-w.sang@pengutronix.de> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1298379500-27590-1-git-send-email-w.sang@pengutronix.de> References: <1298379500-27590-1-git-send-email-w.sang@pengutronix.de> X-SA-Exim-Connect-IP: 2001:6f8:1178:2:221:70ff:fe71:1890 X-SA-Exim-Mail-From: w.sang@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-mmc@vger.kernel.org Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 22 Feb 2011 12:58:30 +0000 (UTC) diff --git a/arch/arm/mach-mx3/mach-pcm043.c b/arch/arm/mach-mx3/mach-pcm043.c index bcf83fc..26b686c 100644 --- a/arch/arm/mach-mx3/mach-pcm043.c +++ b/arch/arm/mach-mx3/mach-pcm043.c @@ -40,6 +40,7 @@ #include #include #include +#include #include "devices-imx35.h" #include "devices.h" @@ -219,12 +220,17 @@ static iomux_v3_cfg_t pcm043_pads[] = { MX35_PAD_SD1_DATA1__ESDHC1_DAT1, MX35_PAD_SD1_DATA2__ESDHC1_DAT2, MX35_PAD_SD1_DATA3__ESDHC1_DAT3, + MX35_PAD_ATA_DATA10__GPIO2_23, /* WriteProtect */ + MX35_PAD_ATA_DATA11__GPIO2_24, /* CardDetect */ }; #define AC97_GPIO_TXFS (1 * 32 + 31) #define AC97_GPIO_TXD (1 * 32 + 28) #define AC97_GPIO_RESET (1 * 32 + 0) +#define SD1_GPIO_WP (1 * 32 + 23) +#define SD1_GPIO_CD (1 * 32 + 24) + static void pcm043_ac97_warm_reset(struct snd_ac97 *ac97) { iomux_v3_cfg_t txfs_gpio = MX35_PAD_STXFS4__GPIO2_31; @@ -307,6 +313,11 @@ pcm037_nand_board_info __initconst = { .hw_ecc = 1, }; +static struct esdhc_platform_data sd1_pdata = { + .wp_gpio = SD1_GPIO_WP, + .cd_gpio = SD1_GPIO_CD, +}; + #if defined(CONFIG_USB_ULPI) static struct mxc_usbh_platform_data otg_pdata __initdata = { .portsc = MXC_EHCI_MODE_UTMI, @@ -393,7 +404,7 @@ static void __init mxc_board_init(void) imx35_add_fsl_usb2_udc(&otg_device_pdata); imx35_add_flexcan1(NULL); - imx35_add_sdhci_esdhc_imx(0, NULL); + imx35_add_sdhci_esdhc_imx(0, &sd1_pdata); } static void __init pcm043_timer_init(void)