From: Valentine Barshak <[email protected]> Set MMC clock when reverting to safe bus mode and speed in case current MMC mode fails. Otherwise, trying out the other modes may fail as well.
Reviewed-by: Marek Vasut <[email protected]> Signed-off-by: Valentine Barshak <[email protected]> [hp: fallback to legacy_speed] Signed-off-by: Hai Pham <[email protected]> --- Cc: "Ying-Chun Liu (PaulLiu)" <[email protected]> Cc: Hai Pham <[email protected]> Cc: Jaehoon Chung <[email protected]> Cc: Loic Poulain <[email protected]> Cc: Peng Fan <[email protected]> Cc: Simon Glass <[email protected]> Cc: Takeshi Kihara <[email protected]> --- drivers/mmc/mmc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 68a76aa3e94..79d0d37c240 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -2231,6 +2231,7 @@ error: mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_BUS_WIDTH, EXT_CSD_BUS_WIDTH_1); mmc_select_mode(mmc, MMC_LEGACY); + mmc_set_clock(mmc, mmc->legacy_speed, MMC_CLK_ENABLE); mmc_set_bus_width(mmc, 1); } } -- 2.39.2

