From patchwork Fri May 6 09:14:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 761382 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 p469FdjR023948 for ; Fri, 6 May 2011 09:15:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755949Ab1EFJPh (ORCPT ); Fri, 6 May 2011 05:15:37 -0400 Received: from smtp.nokia.com ([147.243.128.24]:45648 "EHLO mgw-da01.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755885Ab1EFJPe (ORCPT ); Fri, 6 May 2011 05:15:34 -0400 Received: from nokia.com (localhost [127.0.0.1]) by mgw-da01.nokia.com (Switch-3.4.4/Switch-3.4.3) with ESMTP id p469ESAl017634; Fri, 6 May 2011 12:15:28 +0300 Received: from localhost.localdomain ([helruo-dhcp022207.ntc.nokia.com [172.21.22.207]]) by mgw-da01.nokia.com with RELAY id p469EHe7017428 ; Fri, 6 May 2011 12:15:02 +0300 From: Adrian Hunter To: Tony Lindgren Cc: Madhusudhan Chikkature , linux-omap Mailing List , linux-mmc Mailing List , linux-arm Mailing List , Adrian Hunter Subject: [PATCH V2 15/16] OMAP: hsmmc: add platform data for eMMC hardware reset gpio Date: Fri, 6 May 2011 12:14:14 +0300 Message-Id: <1304673255-31634-16-git-send-email-adrian.hunter@nokia.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1304673255-31634-1-git-send-email-adrian.hunter@nokia.com> References: <1304673255-31634-1-git-send-email-adrian.hunter@nokia.com> X-Nokia-AV: Clean 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]); Fri, 06 May 2011 09:15:39 +0000 (UTC) eMMC may have a hardware reset line connected to a gpio, so pass it to the driver. Signed-off-by: Adrian Hunter Acked-by: Tony Lindgren --- arch/arm/mach-omap2/hsmmc.c | 5 +++++ arch/arm/mach-omap2/hsmmc.h | 1 + arch/arm/plat-omap/include/plat/mmc.h | 1 + 3 files changed, 7 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index c37ba4f..a8078c1 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c @@ -472,6 +472,11 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, mmc->slots[0].switch_pin = c->gpio_cd; mmc->slots[0].gpio_wp = c->gpio_wp; + if (c->gpio_hw_reset) + mmc->slots[0].gpio_hw_reset = c->gpio_hw_reset; + else + mmc->slots[0].gpio_hw_reset = -EINVAL; + mmc->slots[0].remux = c->remux; mmc->slots[0].init_card = c->init_card; diff --git a/arch/arm/mach-omap2/hsmmc.h b/arch/arm/mach-omap2/hsmmc.h index 0f2a87e..b78ed41 100644 --- a/arch/arm/mach-omap2/hsmmc.h +++ b/arch/arm/mach-omap2/hsmmc.h @@ -22,6 +22,7 @@ struct omap2_hsmmc_info { bool nomux; /* No default muxing for this slot */ int gpio_cd; /* or -EINVAL */ int gpio_wp; /* or -EINVAL */ + int gpio_hw_reset; /* hardware reset */ char *name; /* or NULL for default */ struct device *dev; /* returned: pointer to mmc adapter */ int ocr_mask; /* temporary HACK */ diff --git a/arch/arm/plat-omap/include/plat/mmc.h b/arch/arm/plat-omap/include/plat/mmc.h index e3c9b20..9b69b7e 100644 --- a/arch/arm/plat-omap/include/plat/mmc.h +++ b/arch/arm/plat-omap/include/plat/mmc.h @@ -119,6 +119,7 @@ struct omap_mmc_platform_data { int switch_pin; /* gpio (card detect) */ int gpio_wp; /* gpio (write protect) */ + int gpio_hw_reset; /* gpio (hardware reset) */ int (*set_bus_mode)(struct device *dev, int slot, int bus_mode); int (*set_power)(struct device *dev, int slot,