public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: In mmc_power_up, use previously selected ocr if available
@ 2009-02-09 13:28 Balaji Rao
  2009-02-17 21:29 ` Andrew Morton
  2009-02-18 20:25 ` Pierre Ossman
  0 siblings, 2 replies; 6+ messages in thread
From: Balaji Rao @ 2009-02-09 13:28 UTC (permalink / raw)
  To: LKML; +Cc: Andy Green, Pierre Ossman

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>
---
 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 df6ce4a..3ad7f87 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -572,7 +572,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)) {
-- 
1.6.0.6

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-03-08 13:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-09 13:28 [PATCH] mmc: In mmc_power_up, use previously selected ocr if available Balaji Rao
2009-02-17 21:29 ` Andrew Morton
2009-02-18  2:57   ` Balaji Rao
2009-02-18 20:25 ` Pierre Ossman
2009-02-25  9:58   ` [PATCH] mmc: During unsafe resume, select the right volatge for the card Balaji Rao
2009-03-08 13:41     ` Pierre Ossman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox