From 4f0d7f43b8a9d35be25f520834bbb13f2dae10f3 Mon Sep 17 00:00:00 2001 From: merge Date: Mon, 29 Dec 2008 12:11:49 +0000 Subject: MERGE-via-pending-tracking-hist-this-patch-gets-the-linux-mci- pending-tracking-hist top was this-patch-gets-the-linux-mci- / f45f6d893a0dc65a6041a2c0127e9970427a85da ... parent commitmessage: From: Balaji Rao This patch gets the Linux mci stack to use the voltage it negotiated before with the uSD card on resume. Without this, it always reverts to and stays at 3.3V. Signed-off-by: Balaji Rao --- drivers/mmc/core/core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'drivers/mmc') diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index b76667e36e8..56988ff4732 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -496,7 +496,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)) { -- cgit v1.2.3