Commit d9bc4aa5 authored by Balaji Rao's avatar Balaji Rao Committed by James Toy

When mmc_power_up is called during unsafe resume, host->ocr should be used

instead of host->ocr_avail.
Signed-off-by: default avatarBalaji Rao <balajirrao@openmoko.org>
Cc: Andy Green <andy@openmoko.com>
Cc: Pierre Ossman <drzeus-mmc@drzeus.cx>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 92f963ef
......@@ -687,7 +687,13 @@ void mmc_set_timing(struct mmc_host *host, unsigned int timing)
*/
static void mmc_power_up(struct mmc_host *host)
{
int bit = fls(host->ocr_avail) - 1;
int bit;
/* If ocr is set, we use it */
if (host->ocr)
bit = ffs(host->ocr) - 1;
else
bit = fls(host->ocr_avail) - 1;
host->ios.vdd = bit;
if (mmc_host_is_spi(host)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment