[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 8 Aug 2023 11:46:23 +0100
From: Conor Dooley <conor@...nel.org>
To: Duje Mihanović <duje.mihanovic@...le.hr>
Cc: Conor Dooley <conor+dt@...nel.org>,
Lubomir Rintel <lkundrak@...sk>,
Robert Jarzmik <robert.jarzmik@...e.fr>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
Andy Shevchenko <andy@...nel.org>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Kees Cook <keescook@...omium.org>,
Tony Luck <tony.luck@...el.com>,
"Guilherme G. Piccoli" <gpiccoli@...lia.com>,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-clk@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-hardening@...r.kernel.org,
~postmarketos/upstreaming@...ts.sr.ht, phone-devel@...r.kernel.org,
afaerber@...e.de
Subject: Re: [PATCH v4 3/8] dt-bindings: clock: Add Marvell PXA1908 clock
bindings
On Tue, Aug 08, 2023 at 12:41:22PM +0200, Duje Mihanović wrote:
> On Tuesday, August 8, 2023 9:49:49 AM CEST Conor Dooley wrote:
> > On Mon, Aug 07, 2023 at 05:42:37PM +0200, Duje Mihanović wrote:
> > > diff --git a/include/dt-bindings/clock/marvell,pxa1908.h
> > > b/include/dt-bindings/clock/marvell,pxa1908.h new file mode 100644
> > > index 000000000000..0c1f328bf534
> > > --- /dev/null
> > > +++ b/include/dt-bindings/clock/marvell,pxa1908.h
> > > +#define PXA1908_CLK_PLL4VCODIV3 38
> > > +#define PXA1908_MPMU_NR_CLKS 38
> > >
> > > +#define PXA1908_CLK_TWSI3 18
> > > +#define PXA1908_APBC_NR_CLKS 50
> > >
> > > +#define PXA1908_CLK_AICER 3
> > > +#define PXA1908_APBCP_NR_CLKS 50
> > >
> > > +#define PXA1908_CLK_DVC_DFC_DEBUG 16
> > > +#define PXA1908_APMU_NR_CLKS 50
> >
> > How are these "NR_CLKS" things helpful to the binding?
>
> They are used by the clock driver when calling mmp_clk_init which then uses
> that as the size of a struct clk array it allocates. In retrospect, 50 for
> each block may be too much as from what I can tell by reading the
> mmp_register_* functions (number of clocks + 1) for each block should be
> enough, anything less than that causes a null pointer dereference sometime
> during clock initialization.
I think you might have misread my question, I'm not really interested in
the implementation detail of the driver. If these are not used in
devicetree, remove them - otherwise they are being needlessly added to
the ABI.
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists