[PATCH V2 1/5] mmc: fsl_esdhc_imx: Enable AHB/IPG clk with clk bulk API

Fabio Estevam festevam at gmail.com
Thu Oct 3 15:29:41 CEST 2024


On Tue, Oct 1, 2024 at 9:04 AM Peng Fan (OSS) <peng.fan at oss.nxp.com> wrote:

>  #if CONFIG_IS_ENABLED(CLK)
>         /* Assigned clock already set clock */
> -       ret = clk_get_by_name(dev, "per", &priv->per_clk);
> +       ret = clk_get_bulk(dev, &priv->clk_bulk);
>         if (ret) {
> -               printf("Failed to get per_clk\n");
> +               dev_err(dev, "Failed to get clks: %d\n", ret);
>                 return ret;
>         }
> -       ret = clk_enable(&priv->per_clk);
> +
> +       ret = clk_enable_bulk(&priv->clk_bulk);
>         if (ret) {
> -               printf("Failed to enable per_clk\n");
> +               dev_err(dev, "Failed to enable clks: %d\n", ret);
> +               return ret;
> +       }
> +
> +       ret = clk_get_by_name(dev, "per", &priv->per_clk);

Now that you use clk_get_bulk(), why must the 'per' clock be retrieved
separately?

I expect that clk_get_bulk() gets all the clocks.


More information about the U-Boot mailing list