diff options
author | Tony Lin <tony.lin@freescale.com> | 2011-08-03 15:28:14 +0800 |
---|---|---|
committer | Jason Liu <r64343@freescale.com> | 2012-07-20 13:15:12 +0800 |
commit | 1f927e7f3fcadb240d0850873eccb2ad098cef52 (patch) | |
tree | 21edef57ed6cdc046f5ffa68f8716498d2e3e548 /drivers/mmc | |
parent | 453925e469741391c293cf33514ed3e2198f7646 (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.c | 8 |
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; |