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>
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;