From: Kaustabh Chakraborty Date: Fri, 17 Oct 2025 15:24:07 +0000 (+0530) Subject: mmc: dw_mmc: do not skip dwmci_setup_bus() for same non-zero clock frequency X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3a5b187b5c03eff681d4e41823313dfa28dfe845;p=thirdparty%2Fu-boot.git mmc: dw_mmc: do not skip dwmci_setup_bus() for same non-zero clock frequency In dwmci_setup_bus(), if the requested frequency is equal to the current frequency, the function is returned, assuming no changes are required in associated registers. On certain SD cards, skipping in such situations may result in a timeout errors during MMC initialization. Due to the lack of documentation, the cause is unknown, but removing said check seems to fix the issue. Signed-off-by: Kaustabh Chakraborty Reviewed-by: Peng Fan Signed-off-by: Peng Fan --- diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index c6a18a5427a..130a5bb57f3 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -554,7 +554,7 @@ static int dwmci_setup_bus(struct dwmci_host *host, u32 freq) unsigned long sclk; int ret; - if (freq == host->clock || freq == 0) + if (!freq) return 0; /*