public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [Resending PATCH 3/3] Fixes required for HSMMC driver to work as module
@ 2008-08-08  4:13 Madhusudhan Chikkature
  2008-08-08  7:44 ` Tony Lindgren
  0 siblings, 1 reply; 2+ messages in thread
From: Madhusudhan Chikkature @ 2008-08-08  4:13 UTC (permalink / raw)
  To: tony; +Cc: linux-omap

From: Madhusudhan Chikkature<madhu.cr@ti.com>

ARM: OMAP3: Fixes required to make HSMMC driver work as module.Complete the
previously applied patch.

This patch provides the necessary fixes to make the HSMMC driver work as
loadble module.

Signed-off-by: Madhusudhan Chikkature<madhu.cr@ti.com>
Signed-off-by: Romit Dasgupta <romit@ti.com>
---
 drivers/mmc/host/omap_hsmmc.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+)

Index: linux-omap-2.6/drivers/mmc/host/omap_hsmmc.c
===================================================================
--- linux-omap-2.6.orig/drivers/mmc/host/omap_hsmmc.c	2008-08-07
15:56:52.000000000 +0530
+++ linux-omap-2.6/drivers/mmc/host/omap_hsmmc.c	2008-08-07 16:09:22.000000000
+0530
@@ -901,9 +901,26 @@ err:
 static int omap_mmc_remove(struct platform_device *pdev)
 {
 	struct mmc_omap_host *host = platform_get_drvdata(pdev);
+	struct resource *res;
+	u16 vdd = 0;
+
+	if (!(OMAP_HSMMC_READ(host->base, HCTL) & SDVSDET)) {
+	/*
+	 * Set the vdd back to 3V,
+	 * applicable for dual volt support.
+	 */
+		vdd = fls(host->mmc->ocr_avail) - 1;
+		if (omap_mmc_switch_opcond(host, vdd) != 0)
+			host->mmc->ios.vdd = vdd;
+	}
+
+	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	if (res)
+		release_mem_region(res->start, res->end - res->start + 1);

 	platform_set_drvdata(pdev, NULL);
 	if (host) {
+		mmc_remove_host(host->mmc);
 		if (host->pdata->cleanup)
 			host->pdata->cleanup(&pdev->dev);
 		free_irq(host->irq, host);



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Resending PATCH 3/3] Fixes required for HSMMC driver to work as module
  2008-08-08  4:13 [Resending PATCH 3/3] Fixes required for HSMMC driver to work as module Madhusudhan Chikkature
@ 2008-08-08  7:44 ` Tony Lindgren
  0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2008-08-08  7:44 UTC (permalink / raw)
  To: Madhusudhan Chikkature; +Cc: linux-omap

* Madhusudhan Chikkature <madhu.cr@ti.com> [080808 07:14]:
> From: Madhusudhan Chikkature<madhu.cr@ti.com>
> 
> ARM: OMAP3: Fixes required to make HSMMC driver work as module.Complete the
> previously applied patch.
> 
> This patch provides the necessary fixes to make the HSMMC driver work as
> loadble module.

Pushing today.

Tony

> Signed-off-by: Madhusudhan Chikkature<madhu.cr@ti.com>
> Signed-off-by: Romit Dasgupta <romit@ti.com>
> ---
>  drivers/mmc/host/omap_hsmmc.c |   17 +++++++++++++++++
>  1 files changed, 17 insertions(+)
> 
> Index: linux-omap-2.6/drivers/mmc/host/omap_hsmmc.c
> ===================================================================
> --- linux-omap-2.6.orig/drivers/mmc/host/omap_hsmmc.c	2008-08-07
> 15:56:52.000000000 +0530
> +++ linux-omap-2.6/drivers/mmc/host/omap_hsmmc.c	2008-08-07 16:09:22.000000000
> +0530
> @@ -901,9 +901,26 @@ err:
>  static int omap_mmc_remove(struct platform_device *pdev)
>  {
>  	struct mmc_omap_host *host = platform_get_drvdata(pdev);
> +	struct resource *res;
> +	u16 vdd = 0;
> +
> +	if (!(OMAP_HSMMC_READ(host->base, HCTL) & SDVSDET)) {
> +	/*
> +	 * Set the vdd back to 3V,
> +	 * applicable for dual volt support.
> +	 */
> +		vdd = fls(host->mmc->ocr_avail) - 1;
> +		if (omap_mmc_switch_opcond(host, vdd) != 0)
> +			host->mmc->ios.vdd = vdd;
> +	}
> +
> +	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> +	if (res)
> +		release_mem_region(res->start, res->end - res->start + 1);
> 
>  	platform_set_drvdata(pdev, NULL);
>  	if (host) {
> +		mmc_remove_host(host->mmc);
>  		if (host->pdata->cleanup)
>  			host->pdata->cleanup(&pdev->dev);
>  		free_irq(host->irq, host);
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-08-08  7:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-08  4:13 [Resending PATCH 3/3] Fixes required for HSMMC driver to work as module Madhusudhan Chikkature
2008-08-08  7:44 ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox