aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorRoger Tseng <rogerable@realtek.com>2014-09-24 05:07:13 -0400
committerUlf Hansson <ulf.hansson@linaro.org>2014-09-24 05:20:04 -0400
commit8af465db967bf25a4617416c0cbaaaa506d444f5 (patch)
treed596b7ab1c6007cec7a6f0a4ec5907f1cc15465a /drivers/mmc
parent7756a96d1617753d8387e59e0ba410e0dd512be4 (diff)
mmc: core: Add new power_mode MMC_POWER_UNDEFINED
Add MMC_POWER_UNDEFINED for power_mode in struct mmc_ios and use it as the initial value of host->ios.power_mode. For hosts with MMC_CAP2_NO_PRESCAN_POWERUP, this makes the later mmc_power_off() do real power-off things instead of NOP, and further prevents state messed up in cards that was already initialized (eg. by BIOS of UEFI driver). Signed-off-by: Roger Tseng <rogerable@realtek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index b1e209f479ad..cbb23215ad87 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2482,6 +2482,7 @@ void mmc_start_host(struct mmc_host *host)
2482{ 2482{
2483 host->f_init = max(freqs[0], host->f_min); 2483 host->f_init = max(freqs[0], host->f_min);
2484 host->rescan_disable = 0; 2484 host->rescan_disable = 0;
2485 host->ios.power_mode = MMC_POWER_UNDEFINED;
2485 if (host->caps2 & MMC_CAP2_NO_PRESCAN_POWERUP) 2486 if (host->caps2 & MMC_CAP2_NO_PRESCAN_POWERUP)
2486 mmc_power_off(host); 2487 mmc_power_off(host);
2487 else 2488 else