[PATCH] MMC:dw_mmc:when enable biu_clk should check whether this clk is normal
From: ping.gao
Date: Mon Dec 22 2025 - 23:42:34 EST
exynos doesn't use biu_clk , enable it will panic
Signed-off-by: ping.gao <ping.gao@xxxxxxxxxxx>
---
drivers/mmc/host/dw_mmc.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index c5db92bbb094..61f6986f15ef 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -3633,9 +3633,15 @@ int dw_mci_runtime_resume(struct device *dev)
if (host->slot &&
(mmc_host_can_gpio_cd(host->slot->mmc) ||
!mmc_card_is_removable(host->slot->mmc))) {
- ret = clk_prepare_enable(host->biu_clk);
- if (ret)
- return ret;
+ if (IS_ERR(host->biu_clk)) {
+ dev_dbg(host->dev, "biu clock not available\n");
+ } else {
+ ret = clk_prepare_enable(host->biu_clk);
+ if (ret) {
+ dev_err(host->dev, "failed to enable biu clock\n");
+ goto err;
+ }
+ }
}
ret = clk_prepare_enable(host->ciu_clk);
--
2.50.1