mmc: sh_mmcif: fix clock gating on platforms with a .down_pwr() method
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Wed, 16 Nov 2011 09:10:41 +0000 (10:10 +0100)
committerChris Ball <cjb@laptop.org>
Sat, 10 Dec 2011 21:18:37 +0000 (16:18 -0500)
Do not power down the card in .set_ios(), unless MMC_POWER_OFF is
requested. This fixes the MMCIF interface functionality on ecovec boards.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sh_mmcif.c

index 369366c8e205e4ed8aa27746e3a8940b89e54287..d5505f3fe2a170d04fc9011c5b5d2ff886a31df7 100644 (file)
@@ -908,7 +908,7 @@ static void sh_mmcif_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
                if (host->power) {
                        pm_runtime_put(&host->pd->dev);
                        host->power = false;
-                       if (p->down_pwr)
+                       if (p->down_pwr && ios->power_mode == MMC_POWER_OFF)
                                p->down_pwr(host->pd);
                }
                host->state = STATE_IDLE;