summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorTony Lin <tony.lin@freescale.com>2011-08-03 15:28:14 +0800
committerJason Liu <r64343@freescale.com>2012-01-09 20:21:50 +0800
commit124d3ac4e38be0dc3eb6efb41805eca85c7c6973 (patch)
tree7505550e1ef4a8fa32c2db582aa02d098e36ff4c /drivers/mmc
parent6bc0da99d2418190d7f84d0be209bebde84019ce (diff)
ENGR00154217 [MX6Q/D]fix mmc suspend/resume issue.
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>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/core.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index a08b71f73fdc..fb541cc8a92c 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -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;