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

Peng Fan peng.fan at nxp.com
Fri Oct 4 12:05:19 CEST 2024


> Subject: Re: [PATCH V2 1/5] mmc: fsl_esdhc_imx: Enable AHB/IPG clk
> with clk bulk API
> 
> 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.

Yes, but we need the rate of per clock, clk_get_bulk does not know
which one is per clock.

Thanks,
Peng.



More information about the U-Boot mailing list