]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
hsmmc: Fix comments from Pierre
authorTony Lindgren <tony@atomide.com>
Tue, 23 Dec 2008 12:25:02 +0000 (14:25 +0200)
committerTony Lindgren <tony@atomide.com>
Tue, 23 Dec 2008 12:25:02 +0000 (14:25 +0200)
Also remove "change vdd back to 3V" in omap_mmc_remove() as it
seems unnecessary. If it's a hw workaround, we can add it back
as needed.

Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/mmc/host/omap_hsmmc.c

index c1b66ca25c1e76dadef084312bee3700cdd1c444..59c594615da38fed7dcca4146d48d8d3da72ed14 100644 (file)
@@ -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;
 }