[Maverick] [PATCH] UBUNTU - ARM: Reverting patch that break mmc init

Mathieu Poirier mathieu.poirier at canonical.com
Mon Aug 9 16:58:18 UTC 2010


>From 7b666254b3b52989749916094629f3efc8d50a7b Mon Sep 17 00:00:00 2001
From: Mathieu J. Poirier <mathieu.poirier at canonical.com>
Date: Mon, 9 Aug 2010 12:49:51 -0400
Subject: [PATCH] UBUNTU - ARM: Reverting patch that break mmc init

This patch breaks mmc initialisation when the following flags
are set:

CONFIG_PREEMPT_VOLUNTARY
CONFIG_CPU_FREQ
CONFIG_CPU_IDLE
CONFIG_SND_SOC.

The power management subsystem will skip the card initialisation
when power_mode is equal to "MMC_POWER_OFF", something that was
done in the second portion of the patch.

BugLink: https://bugs/launchpad.net/bugs/591941

Signed-off-by: Mathieu Poirier <mathieu.poirier at canonical.com>

Revert "omap_hsmmc: Ensure regulator enable / disable are paired"

This reverts commit 6da20c89af64b75302399369a90b9d50c1a87665.
---
 drivers/mmc/host/omap_hsmmc.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index b032828..1c37d0d 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -297,8 +297,11 @@ static int omap_hsmmc_23_set_power(struct device *dev, int slot, int power_on,
 				ret = mmc_regulator_set_ocr(host->vcc, 0);
 		}
 	} else {
-		if (host->vcc_aux)
-			ret = regulator_disable(host->vcc_aux);
+		if (host->vcc_aux) {
+			ret = regulator_is_enabled(host->vcc_aux);
+			if (ret > 0)
+				ret = regulator_disable(host->vcc_aux);
+		}
 		if (ret == 0)
 			ret = mmc_regulator_set_ocr(host->vcc, 0);
 	}
@@ -2010,7 +2013,7 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev)
 	host->slot_id	= 0;
 	host->mapbase	= res->start;
 	host->base	= ioremap(host->mapbase, SZ_4K);
-	host->power_mode = MMC_POWER_OFF;
+	host->power_mode = -1;
 
 	platform_set_drvdata(pdev, host);
 	INIT_WORK(&host->mmc_carddetect_work, omap_hsmmc_detect);
-- 
1.7.0.4







More information about the kernel-team mailing list