Re: [PATCH 1/2] dt-bindings: clock: axi-clkgen: include AXI clk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 28, 2024 at 03:01:44PM +0100, Nuno Sá wrote:

> > > The assumption is that the axi clock is the last one in the phandle array. But
> > > your
> > > comment made me think a bit more about this and I do see a possible problem if we
> > > run
> > > old DTs against a kernel with this patch. We have two possibilities:
> > > 
> > > 1) DT only with one parent clock;
> > > 2) DT with two parent clocks;
> > > 
> > > 1) is "fine" as it would now fail to probe. 2) is more problematic as we would
> > > assume
> > > the second parent to be the axi_bus clock so effectively not fixing anything and
> > > silently probing with a broken setup.
> > > 
> > > So yeah, I think I overthinked the backward compatibility thing. I mean, in
> > > theory,
> > > all old DTs are not correct and should be fixed by including the axi_clk. And if
> > > we
> > > now enforce clock-names we at least get probe errors right away making it clear
> > > (which is far better from silently breaking after probe).
> > > 
> > > Given the above, it should be fine to just enforce clock-names now, right?
> > 
> > I think you need to enforce clock-names in the binding and take
> > !clock-names and 2 clocks to mean that the second one is a clkin. I
> > think that's a better solution than failing to probe for all extant
> > devicestrees.
> 
> Ok, so IIUC, you mean leaving old DTs as of today and relying on someone else to
> enable the axi clock (if it was not enabled they would have noticed by now).

Yea. Obviously any old dts within reach (so those in-tree) should be
updated to have the missing third clock, but as we can't be sure we have
changed all users, so the driver must retain its current functionality
with the old devicetrees.

> And only
> take care of the bus clock when clock-names is provided?

Yup.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux