]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
omap_hsmmc: do not re-power when powering off MMC
authorAdrian Hunter <ext-adrian.hunter@nokia.com>
Tue, 24 Feb 2009 12:48:16 +0000 (14:48 +0200)
committerPierre Ossman <drzeus@drzeus.cx>
Tue, 24 Mar 2009 20:29:59 +0000 (21:29 +0100)
Remove code that turns MMC1 power back on after it
has been powered off (when the voltage is 1.8V).

The offending code is not necessary because the
host controller bus voltage is initialized to
3V when probing or resuming.  Note that MMC powers up
with the highest voltage available (see mmc_power_up())
which will be 3V also.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
drivers/mmc/host/omap_hsmmc.c

index a631c81dce1243bcb9bacefd26dcd3f0e439073d..303a7970806d9913715d49550c0bb6c43103453d 100644 (file)
@@ -485,9 +485,6 @@ static int omap_mmc_switch_opcond(struct mmc_omap_host *host, int vdd)
        u32 reg_val = 0;
        int ret;
 
-       if (host->id != OMAP_MMC1_DEVID)
-               return 0;
-
        /* Disable the clocks */
        clk_disable(host->fclk);
        clk_disable(host->iclk);
@@ -786,20 +783,6 @@ static void omap_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
        switch (ios->power_mode) {
        case MMC_POWER_OFF:
                mmc_slot(host).set_power(host->dev, host->slot_id, 0, 0);
-               /*
-                * Reset interface voltage to 3V if it's 1.8V now;
-                * only relevant on MMC-1, the others always use 1.8V.
-                *
-                * REVISIT: If we are able to detect cards after unplugging
-                * a 1.8V card, this code should not be needed.
-                */
-               if (host->id != OMAP_MMC1_DEVID)
-                       break;
-               if (!(OMAP_HSMMC_READ(host->base, HCTL) & SDVSDET)) {
-                       int vdd = fls(host->mmc->ocr_avail) - 1;
-                       if (omap_mmc_switch_opcond(host, vdd) != 0)
-                               host->mmc->ios.vdd = vdd;
-               }
                break;
        case MMC_POWER_UP:
                mmc_slot(host).set_power(host->dev, host->slot_id, 1, ios->vdd);