From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: [PATCH 4/4] mmc: omap_hsmmc: Simplify init for twl6030 MMC card detect Date: Fri, 2 Mar 2012 09:22:51 -0800 Message-ID: <20120302172251.GJ18901@atomide.com> References: <20120301185044.29210.44521.stgit@kaulin.local> <20120301185535.29210.71546.stgit@kaulin.local> <4F50643B.9050500@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mho-02-ewr.mailhop.org ([204.13.248.72]:23221 "EHLO mho-02-ewr.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756218Ab2CBRWz (ORCPT ); Fri, 2 Mar 2012 12:22:55 -0500 Content-Disposition: inline In-Reply-To: <4F50643B.9050500@ti.com> Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-mmc@vger.kernel.org To: Rajendra Nayak Cc: linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Samuel Ortiz , linux-mmc@vger.kernel.org, Chris Ball , linux-arm-kernel@lists.infradead.org * Rajendra Nayak [120301 21:38]: > On Friday 02 March 2012 12:25 AM, Tony Lindgren wrote: > >--- a/arch/arm/mach-omap2/board-omap4panda.c > >+++ b/arch/arm/mach-omap2/board-omap4panda.c > >@@ -153,8 +153,8 @@ static struct omap2_hsmmc_info mmc[] = { > > { > > .mmc = 1, > > .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, > >- .gpio_wp = -EINVAL, > > .gpio_cd = -EINVAL, > >+ .gpio_wp = -EINVAL, > > stray change. Hmm I'd like to keep this change before this ordering gets copied to ten other board files that we may have in testing-board for a while.. I'll add a comment to the patch description about that. > >--- a/drivers/mmc/host/omap_hsmmc.c > >+++ b/drivers/mmc/host/omap_hsmmc.c > >@@ -34,6 +34,7 @@ > > #include > > #include > > #include > >+#include > > #include > > #include > > #include > >@@ -578,6 +579,32 @@ static void omap_hsmmc_gpio_free(struct omap_hsmmc_host *host) > > gpio_free(host->gpio_cd); > > } > > > >+#ifdef CONFIG_TWL4030_CORE > >+static int omap_hsmmc_init_twl6030(struct omap_hsmmc_host *host) > >+{ > >+ struct omap_mmc_platform_data *pdata = host->pdata; > >+ struct omap_mmc_slot_data *slot =&pdata->slots[0]; > >+ int irq; > >+ > >+ if (gpio_is_valid(host->gpio_cd) || host->id) > > I have a series, which I am asking Chris to pull, which completely > gets rid of all host->id based hard-codings' in the driver. > Isn't there a better way to do this than rely on the device instance? Yes I was thinking about that too. I guess we need to pass some flag in pdata for twl6030 card detect. I was thinking about using the gpiochip_cd, but twl6030 is not gpio based card detect, so a separate flag is better. BTW, with -rc5, looks like re-inserting omap_hsmmc on omap4 fails to detect any cards, and then fails to unload. This works on omap3 just fine. Any ideas why that would be? Regards, Tony