Commit 509f205d authored by Madhusudhan Chikkature's avatar Madhusudhan Chikkature Committed by Tony Lindgren

Fixes required for HSMMC driver to work as module

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: default avatarRomit Dasgupta <romit@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent b529db6a
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment