X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmmc%2Fhost%2Fomap_hsmmc.c;h=59c594615da38fed7dcca4146d48d8d3da72ed14;hb=631a94eea8c20cc7c01bbba788bb04e80ef63107;hp=c1b66ca25c1e76dadef084312bee3700cdd1c444;hpb=76044b05598cd9350738c3e74018a29960e3ca24;p=linux-2.6-omap-h63xx.git diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index c1b66ca25c1..59c594615da 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -294,9 +294,10 @@ mmc_omap_start_command(struct mmc_omap_host *host, struct mmc_command *cmd, /* * Unlike OMAP1 controller, the cmdtype does not seem to be based on - * ac, bc, adtc, bcr. Only CMD12 needs a val of 0x3, rest 0x0. + * ac, bc, adtc, bcr. Only commands ending an open ended transfer need + * a val of 0x3, rest 0x0. */ - if (cmd->opcode == 12) + if (cmd == host->mrq->stop) cmdtype = 0x3; cmdreg = (cmd->opcode << 24) | (resptype << 16) | (cmdtype << 22); @@ -1003,7 +1004,7 @@ static int __init omap_mmc_probe(struct platform_device *pdev) * MMC can still work without debounce clock. */ if (IS_ERR(host->dbclk)) - dev_dbg(mmc_dev(host->mmc), "Failed to get debounce clock\n"); + dev_warn(mmc_dev(host->mmc), "Failed to get debounce clock\n"); else if (clk_enable(host->dbclk) != 0) dev_dbg(mmc_dev(host->mmc), "Enabling debounce" @@ -1131,26 +1132,7 @@ 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 (host) { - mmc_omap_fclk_state(host, ON); - 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) @@ -1173,6 +1155,11 @@ static int omap_mmc_remove(struct platform_device *pdev) iounmap(host->base); } + 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); + return 0; }