[PATCH 4/4] clk: scmi: Add workaround for set_rate/enable/disable

Tom Rini trini at konsulko.com
Tue Oct 8 05:47:41 CEST 2024


On Tue, Oct 08, 2024 at 03:02:13AM +0000, Peng Fan wrote:
> > Subject: Re: [PATCH 4/4] clk: scmi: Add workaround for
> > set_rate/enable/disable
> > 
> > On Sun, Oct 06, 2024 at 05:38:25PM +0800, alice.guo at oss.nxp.com
> > wrote:
> > > From: Ye Li <ye.li at nxp.com>
> > >
> > > Add workaround to set_rate/enable/disable to bus clock that SM will
> > > reply DENIED error.
> > >
> > > Signed-off-by: Ye Li <ye.li at nxp.com>
> > > Signed-off-by: Alice Guo <alice.guo at nxp.com>
> > > Reviewed-by: Peng Fan <peng.fan at nxp.com>
> > 
> > In general, please include a cover letter so it will be clearer what the
> > overall goal is, especially once merged.
> > 
> > > ---
> > >  drivers/clk/clk_scmi.c | 21 +++++++++++++++++++--
> > >  1 file changed, 19 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/clk/clk_scmi.c b/drivers/clk/clk_scmi.c index
> > > a01292c479..a860a653ba 100644
> > > --- a/drivers/clk/clk_scmi.c
> > > +++ b/drivers/clk/clk_scmi.c
> > > @@ -73,7 +73,13 @@ static int scmi_clk_gate(struct clk *clk, int
> > enable)
> > >  	if (ret)
> > >  		return ret;
> > >
> > > -	return scmi_to_linux_errno(out.status);
> > > +	ret = scmi_to_linux_errno(out.status);
> > > +	if (ret == -EACCES) {
> > > +		debug("Ignore %s enable failure\n",
> > clk_hw_get_name(clk));
> > > +		ret = 0;
> > > +	}
> > > +
> > > +	return ret;
> > >  }
> > 
> > This seems like a generic change being made globally and not a work-
> > around for a specific problem on (some?) iMX families.
> 
> We have changed Linux upstream to this behavior, but better
> in firmware/clock.c as linux,
> https://elixir.bootlin.com/linux/v6.11.2/source/drivers/firmware/arm_scmi/clock.c#L761

Please mention stuff like that in the commit message, as well as the
cover letter overview of what you're changing / why, thanks.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20241007/41d3d84b/attachment.sig>


More information about the U-Boot mailing list