From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: [PATCH V2 15/16] OMAP: hsmmc: add platform data for eMMC hardware reset gpio Date: Thu, 12 May 2011 03:38:27 -0700 Message-ID: <20110512103827.GK31483@atomide.com> References: <1304673255-31634-1-git-send-email-adrian.hunter@nokia.com> <1304673255-31634-16-git-send-email-adrian.hunter@nokia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1304673255-31634-16-git-send-email-adrian.hunter@nokia.com> Sender: linux-omap-owner@vger.kernel.org To: Adrian Hunter Cc: Madhusudhan Chikkature , linux-omap Mailing List , linux-mmc Mailing List , linux-arm Mailing List List-Id: linux-mmc@vger.kernel.org * Adrian Hunter [110506 02:11]: > eMMC may have a hardware reset line connected to a gpio, > so pass it to the driver. > > Signed-off-by: Adrian Hunter This looks safe to merge via MMC list: 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, > -- > 1.7.0.4 >