[U-Boot] [PATCH v2 17/26] mmc: disable the mmc clock during power off

Jean-Jacques Hiblot jjhiblot at ti.com
Thu Sep 21 14:30:04 UTC 2017


From: Kishon Vijay Abraham I <kishon at ti.com>

There is no point in having the mmc clock enabled during
power off. Disable the mmc clock. This is similar to how it's
programmed in Linux Kernel.

Signed-off-by: Kishon Vijay Abraham I <kishon at ti.com>
Signed-off-by: Vignesh R <vigneshr at ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot at ti.com>
Reviewed-by: Simon Glass <sjg at chromium.org>
---
 drivers/mmc/mmc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 1c941a2..1f9730e 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1971,6 +1971,7 @@ static int mmc_power_on(struct mmc *mmc)
 
 static int mmc_power_off(struct mmc *mmc)
 {
+	mmc_set_clock(mmc, 1, true);
 #if CONFIG_IS_ENABLED(DM_MMC) && CONFIG_IS_ENABLED(DM_REGULATOR)
 	if (mmc->vmmc_supply) {
 		int ret = regulator_set_enable(mmc->vmmc_supply, false);
-- 
1.9.1



More information about the U-Boot mailing list