summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorValentine Barshak <valentine.barshak@cogentembedded.com>2023-06-10 14:22:33 +0300
committerJaehoon Chung <jh80.chung@samsung.com>2023-07-18 03:17:29 +0300
commit50dee4f3610331cc31f1f02f9d4116b716907011 (patch)
tree316595b4833bc8d5d80cc77e7ef1d37acdc5db0e /drivers
parent99ab3d8dc45c184dcec692fd7130f8732e8c25e4 (diff)
downloadu-boot-50dee4f3610331cc31f1f02f9d4116b716907011.tar.xz
mmc: Set clock when reverting to safe bus mode
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 <marek.vasut+renesas@mailbox.org> Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com> [hp: fallback to legacy_speed] Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/mmc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index de3f569da1..31cfda2885 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -2240,6 +2240,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);
}
}