rockchip: fix probe sdmmc on rk3588

This commit is contained in:
Ben Whitten 2024-08-05 21:59:12 +08:00 committed by Tianling Shen
parent de55e7750d
commit a3a1174536
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -0,0 +1,25 @@
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -3294,6 +3294,10 @@ int dw_mci_probe(struct dw_mci *host)
host->biu_clk = devm_clk_get(host->dev, "biu");
if (IS_ERR(host->biu_clk)) {
dev_dbg(host->dev, "biu clock not available\n");
+ ret = PTR_ERR(host->biu_clk);
+ if (ret == -EPROBE_DEFER) {
+ return ret;
+ }
} else {
ret = clk_prepare_enable(host->biu_clk);
if (ret) {
@@ -3305,6 +3309,11 @@ int dw_mci_probe(struct dw_mci *host)
host->ciu_clk = devm_clk_get(host->dev, "ciu");
if (IS_ERR(host->ciu_clk)) {
dev_dbg(host->dev, "ciu clock not available\n");
+ ret = PTR_ERR(host->ciu_clk);
+ if (ret == -EPROBE_DEFER) {
+ goto err_clk_biu;
+ }
+
host->bus_hz = host->pdata->bus_hz;
} else {
ret = clk_prepare_enable(host->ciu_clk);