From patchwork Thu Aug 25 14:37:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Arnaud Patard (Rtp)" X-Patchwork-Id: 1096642 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7PEdh8l031328 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 25 Aug 2011 14:40:04 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qwb5a-0001km-0N; Thu, 25 Aug 2011 14:39:26 +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 1Qwb5Z-0004Gp-Hq; Thu, 25 Aug 2011 14:39:25 +0000 Received: from lebrac.rtp-net.org ([88.191.135.105]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qwb5W-0004GT-Fg for linux-arm-kernel@lists.infradead.org; Thu, 25 Aug 2011 14:39:23 +0000 Received: by lebrac.rtp-net.org (Postfix, from userid 1000) id B2AE029264; Thu, 25 Aug 2011 16:38:46 +0200 (CEST) Message-Id: <20110825143806.625158261@rtp-net.org> User-Agent: quilt/0.48-1 Date: Thu, 25 Aug 2011 16:37:57 +0200 From: Arnaud Patard (Rtp) To: linux-arm-kernel@lists.infradead.org Subject: [patch 1/1] efika: Configure esdhc cd/wp on efika mx/sb Content-Disposition: inline; filename=efika_mmc.patch X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110825_103922_664020_B8D07F56 X-CRM114-Status: GOOD ( 11.96 ) X-Spam-Score: -0.5 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain Cc: 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: , 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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 25 Aug 2011 14:40:04 +0000 (UTC) Update sdhc support on efika to make use of the latest mmc fixes. Signed-off-by: Arnaud Patard Index: linux-2.6-submit/arch/arm/mach-mx5/board-mx51_efikamx.c =================================================================== --- linux-2.6-submit.orig/arch/arm/mach-mx5/board-mx51_efikamx.c 2011-06-20 20:37:40.000000000 +0200 +++ linux-2.6-submit/arch/arm/mach-mx5/board-mx51_efikamx.c 2011-06-21 01:13:10.000000000 +0200 @@ -163,6 +163,11 @@ static const struct gpio_led_platform_da .num_leds = ARRAY_SIZE(mx51_efikamx_leds), }; +static struct esdhc_platform_data sd_pdata = { + .cd_type = ESDHC_CD_CONTROLLER, + .wp_type = ESDHC_WP_CONTROLLER, +}; + static struct gpio_keys_button mx51_efikamx_powerkey[] = { { .code = KEY_POWER, @@ -239,9 +244,11 @@ static void __init mx51_efikamx_init(voi /* on < 1.2 boards both SD controllers are used */ if (system_rev < 0x12) { - imx51_add_sdhci_esdhc_imx(1, NULL); + imx51_add_sdhci_esdhc_imx(0, NULL); + imx51_add_sdhci_esdhc_imx(1, &sd_pdata); mx51_efikamx_leds[2].default_trigger = "mmc1"; - } + } else + imx51_add_sdhci_esdhc_imx(0, &sd_pdata); gpio_led_register_device(-1, &mx51_efikamx_leds_data); imx_add_gpio_keys(&mx51_efikamx_powerkey_data); Index: linux-2.6-submit/arch/arm/mach-mx5/board-mx51_efikasb.c =================================================================== --- linux-2.6-submit.orig/arch/arm/mach-mx5/board-mx51_efikasb.c 2011-06-20 20:43:49.000000000 +0200 +++ linux-2.6-submit/arch/arm/mach-mx5/board-mx51_efikasb.c 2011-06-21 00:04:03.000000000 +0200 @@ -147,6 +147,8 @@ static iomux_v3_cfg_t mx51efikasb_pads[] MX51_PAD_DISPB2_SER_DIO__GPIO3_6, /* ac in */ EFIKASB_AC_IN, + + _MX51_PAD_EIM_CS2__GPIO2_27 | MUX_PAD_CTRL(MX51_ESDHC_PAD_CTRL), }; static int initialize_usbh2_port(struct platform_device *pdev) @@ -233,6 +235,18 @@ static const struct gpio_keys_platform_d .nbuttons = ARRAY_SIZE(mx51_efikasb_keys), }; +static struct esdhc_platform_data sd0_pdata = { +#define EFIKASB_SD1_CD IMX_GPIO_NR(2, 27) + .cd_gpio = EFIKASB_SD1_CD, + .cd_type = ESDHC_CD_GPIO, + .wp_type = ESDHC_WP_CONTROLLER, +}; + +static struct esdhc_platform_data sd1_pdata = { + .cd_type = ESDHC_CD_CONTROLLER, + .wp_type = ESDHC_WP_CONTROLLER, +}; + static struct mtl017_pdata mx51_efikasb_mtl017 = { .disp_i2c_bus_id = 1, .lvds_reset_gpio = EFIKASB_LVDS_RESET, @@ -451,7 +465,8 @@ static void __init efikasb_board_init(vo mx51_efikasb_board_id(); mx51_efikasb_usb(); - imx51_add_sdhci_esdhc_imx(1, NULL); + imx51_add_sdhci_esdhc_imx(0, &sd0_pdata); + imx51_add_sdhci_esdhc_imx(1, &sd1_pdata); mx51_efikasb_display(); platform_device_register(&mx51_efikasb_rfkill_device); Index: linux-2.6-submit/arch/arm/mach-mx5/mx51_efika.c =================================================================== --- linux-2.6-submit.orig/arch/arm/mach-mx5/mx51_efika.c 2011-06-20 20:36:15.000000000 +0200 +++ linux-2.6-submit/arch/arm/mach-mx5/mx51_efika.c 2011-06-21 01:13:07.000000000 +0200 @@ -704,7 +704,6 @@ void __init efika_board_common_init(void mx51_efika_usb(); imx51_add_imx2_wdt(0, NULL); mx51_efika_i2c(); - imx51_add_sdhci_esdhc_imx(0, NULL); /* FIXME: comes from original code. check this. */ if (mx51_revision() < IMX_CHIP_REVISION_2_0)