From patchwork Thu May 5 11:51:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 756892 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 p45BquWE019411 for ; Thu, 5 May 2011 11:52:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753922Ab1EELwy (ORCPT ); Thu, 5 May 2011 07:52:54 -0400 Received: from smtp.nokia.com ([147.243.128.24]:63440 "EHLO mgw-da01.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753909Ab1EELwx (ORCPT ); Thu, 5 May 2011 07:52:53 -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 p45BqGJm024974; Thu, 5 May 2011 14:52:46 +0300 Received: from localhost.localdomain ([[172.21.24.109]]) by mgw-da01.nokia.com with RELAY id p45BpO7B023786 ; Thu, 5 May 2011 14:52:29 +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 21/22] OMAP: hsmmc: add platform data for eMMC hardware reset gpio Date: Thu, 5 May 2011 14:51:21 +0300 Message-Id: <1304596282-4095-22-git-send-email-adrian.hunter@nokia.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1304596282-4095-1-git-send-email-adrian.hunter@nokia.com> References: <1304596282-4095-1-git-send-email-adrian.hunter@nokia.com> X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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]); Thu, 05 May 2011 11:52:56 +0000 (UTC) eMMC may have a hardware reset line connected to a gpio, so pass it to the driver. Signed-off-by: Adrian Hunter --- 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 34cba89..85f27af 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,