[Resending PATCH 3/3] Fixes required for HSMMC driver to work as module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Madhusudhan Chikkature<madhu.cr@xxxxxx>

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@xxxxxx>
Signed-off-by: Romit Dasgupta <romit@xxxxxx>
---
 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);


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux