[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPDyKFr_gs+KuKkSOYMUpKJyqKB3VnrRL9KPpDKiCAjwUy80fQ@mail.gmail.com>
Date: Tue, 30 Dec 2025 16:17:52 +0100
From: Ulf Hansson <ulf.hansson@...aro.org>
To: "ping.gao" <ping.gao@...sung.com>
Cc: jh80.chung@...sung.com, linux-mmc@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] MMC:dw_mmc:when enable biu_clk should check whether this
clk is normal
On Tue, 23 Dec 2025 at 05:42, ping.gao <ping.gao@...sung.com> wrote:
>
> exynos doesn't use biu_clk , enable it will panic
Please elaborate a bit more on what the patch does.
>
> Signed-off-by: ping.gao <ping.gao@...sung.com>
> ---
> 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;
> + }
> + }
Rather than making the change in dw_mci_runtime_resume(), I suggest we
set "host->biu_clk = NULL" in dw_mci_probe(), rather than keeping its
error code.
In this way, clk_prepare_enable() will not return an error code above.
> }
>
> ret = clk_prepare_enable(host->ciu_clk);
> --
> 2.50.1
>
Kind regards
Uffe
Powered by blists - more mailing lists