diff options
author | Tony Lin <tony.lin@freescale.com> | 2011-08-03 15:28:14 +0800 |
---|---|---|
committer | Tony Lin <tony.lin@freescale.com> | 2011-08-03 15:33:54 +0800 |
commit | 5be52ea80c2ab88f609054b92a75067988a48f39 (patch) | |
tree | f160adc1ad3c85852bd5d734eea84e07c6b0ac2c /drivers | |
parent | a8d6e9bf1b7eacd48d954b69b9d8cae34c9117bc (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')
-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 cf237f14800..81a5f87b6a0 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1014,7 +1014,13 @@ static 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; |