]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00154217 [MX6Q/D]fix mmc suspend/resume issue.
authorTony Lin <tony.lin@freescale.com>
Wed, 3 Aug 2011 07:28:14 +0000 (15:28 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:09:25 +0000 (14:09 +0200)
following log is the scenario.

mmc0: host doesn't support card's voltages
mmc0: error -110 during resume (card was removed?)

can't clear ocr in power off, instead we need to set
it to the highest bit of ocr_avail.

Signed-off-by: Tony Lin <tony.lin@freescale.com>
drivers/mmc/core/core.c

index a08b71f73fdca328a4c32dee58902351768791a2..fb541cc8a92c9829e40664a5b9cfbb04a712e118 100644 (file)
@@ -1075,7 +1075,13 @@ void mmc_power_off(struct mmc_host *host)
 
        host->ios.clock = 0;
        host->ios.vdd = 0;
-       host->ocr = 0;
+
+       /*
+        * Reset ocr mask to be the highest possible voltage supported for
+        * this mmc host. This value will be used at next power up.
+        */
+       host->ocr = 1 << (fls(host->ocr_avail) - 1);
+
        if (!mmc_host_is_spi(host)) {
                host->ios.bus_mode = MMC_BUSMODE_OPENDRAIN;
                host->ios.chip_select = MMC_CS_DONTCARE;