diff options
author | Balaji Rao <balajirrao@openmoko.org> | 2009-09-22 19:44:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 10:39:32 -0400 |
commit | 500f35648e5ebd04be00f974738a9db959a892b8 (patch) | |
tree | 1597409b739e9d63f554c520bce1d057e1e328a7 /drivers/mmc/core | |
parent | e56770fbc48c1517f620f9f68e3f728e74d52bf5 (diff) |
mmc: in mmc_power_up(), use previously selected ocr if available
When mmc_power_up is called during unsafe resume, host->ocr should be used
instead of host->ocr_avail.
Signed-off-by: Balaji Rao <balajirrao@openmoko.org>
Cc: Andy Green <andy@openmoko.com>
Cc: Pierre Ossman <drzeus-mmc@drzeus.cx>
Cc: Ian Molton <ian@mnementh.co.uk>
Cc: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
Cc: Philip Langdale <philipl@overt.org>
Acked-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/mmc/core')
-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 d84c880fac84..e22d2b5576ec 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c | |||
@@ -687,7 +687,13 @@ void mmc_set_timing(struct mmc_host *host, unsigned int timing) | |||
687 | */ | 687 | */ |
688 | static void mmc_power_up(struct mmc_host *host) | 688 | static void mmc_power_up(struct mmc_host *host) |
689 | { | 689 | { |
690 | int bit = fls(host->ocr_avail) - 1; | 690 | int bit; |
691 | |||
692 | /* If ocr is set, we use it */ | ||
693 | if (host->ocr) | ||
694 | bit = ffs(host->ocr) - 1; | ||
695 | else | ||
696 | bit = fls(host->ocr_avail) - 1; | ||
691 | 697 | ||
692 | host->ios.vdd = bit; | 698 | host->ios.vdd = bit; |
693 | if (mmc_host_is_spi(host)) { | 699 | if (mmc_host_is_spi(host)) { |