[PATCH 1/5] mmc: fsl_esdhc_imx: Enable AHB/IPG clk

Fabio Estevam festevam at gmail.com
Mon Sep 30 13:17:03 CEST 2024


Hi Peng,

On Mon, Sep 30, 2024 at 2:47 AM Peng Fan (OSS) <peng.fan at oss.nxp.com> wrote:
>
> From: Peng Fan <peng.fan at nxp.com>
>
> Only enable PER clk is not enough, also need to enable AHB/IPG clk.

Currently, the driver is working and now extra clocks need to be turned on.

Please provide more details here as to why this is a problem now and
it wasn't before.

>  #if CONFIG_IS_ENABLED(CLK)
>         /* Assigned clock already set clock */
> +       ret = clk_get_by_name(dev, "ipg", &priv->ipg_clk);
> +       if (!ret) {
> +               ret = clk_enable(&priv->ipg_clk);
> +               if (ret) {
> +                       printf("Failed to enable ipg_clk\n");
> +                       return ret;
> +               }
> +       }
> +
> +       ret = clk_get_by_name(dev, "ahb", &priv->ahb_clk);
> +       if (!ret) {
> +               ret = clk_enable(&priv->ahb_clk);
> +               if (ret) {
> +                       printf("Failed to enable ahb_clk\n");
> +                       return ret;

In the case of failure, the previously enabled clock must be disabled.

Would it be better to use clk_enable_bulk() here instead?


More information about the U-Boot mailing list