[PATCH 2/9] mmc: dw_mmc: do not skip dwmci_setup_bus() for same non-zero clock frequency

Kaustabh Chakraborty kauschluss at disroot.org
Fri Oct 17 17:24:07 CEST 2025


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 <kauschluss at disroot.org>
---
 drivers/mmc/dw_mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index c6a18a5427ac64cc74a0a95f9780156b52beeee5..130a5bb57f3cddc50b3cd0df2f40981de680e852 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;
 
 	/*

-- 
2.51.0



More information about the U-Boot mailing list