phone-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: "Duje Mihanović" <duje.mihanovic@skole.hr>
Cc: Conor Dooley <conor+dt@kernel.org>,
	Lubomir Rintel <lkundrak@v3.sk>,
	Robert Jarzmik <robert.jarzmik@free.fr>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	Andy Shevchenko <andy@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>, Kees Cook <keescook@chromium.org>,
	Tony Luck <tony.luck@intel.com>,
	"Guilherme G. Piccoli" <gpiccoli@igalia.com>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-hardening@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht,
	phone-devel@vger.kernel.org, afaerber@suse.de
Subject: Re: [PATCH v4 3/8] dt-bindings: clock: Add Marvell PXA1908 clock bindings
Date: Tue, 8 Aug 2023 11:46:23 +0100	[thread overview]
Message-ID: <20230808-quizzical-footwork-4846d6461f74@spud> (raw)
In-Reply-To: <2155917.irdbgypaU6@radijator>

[-- Attachment #1: Type: text/plain, Size: 1523 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2023-08-08 20:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-07 15:42 [PATCH v4 0/8] Initial Marvell PXA1908 support Duje Mihanović
2023-08-07 15:42 ` [PATCH v4 1/8] gpio: pxa: disable pinctrl calls for MMP_GPIO Duje Mihanović
2023-08-07 15:42 ` [PATCH v4 2/8] clk: mmp: Switch to use struct u32_fract instead of custom one Duje Mihanović
2023-08-07 15:42 ` [PATCH v4 3/8] dt-bindings: clock: Add Marvell PXA1908 clock bindings Duje Mihanović
2023-08-08  7:49   ` Conor Dooley
2023-08-08 10:41     ` Duje Mihanović
2023-08-08 10:46       ` Conor Dooley [this message]
2023-08-08 11:03         ` Duje Mihanović
2023-08-08 11:23           ` Conor Dooley
2023-08-07 15:42 ` [PATCH v4 4/8] clk: mmp: Add Marvell PXA1908 clock driver Duje Mihanović
2023-08-07 15:42 ` [PATCH v4 5/8] dt-bindings: marvell: Document PXA1908 SoC Duje Mihanović
2023-08-07 15:42 ` [PATCH v4 6/8] arm64: Kconfig.platforms: Add config for Marvell PXA1908 platform Duje Mihanović
2023-08-07 15:42 ` [PATCH v4 7/8] arm64: dts: Add DTS for Marvell PXA1908 and samsung,coreprimevelte Duje Mihanović
2023-08-07 21:02 ` [PATCH v4 0/8] Initial Marvell PXA1908 support Duje Mihanović
2023-08-08  5:58   ` Krzysztof Kozlowski
2023-08-08 10:13 ` [PATCH v4 8/8] MAINTAINERS: add myself as Marvell PXA1908 maintainer Duje Mihanović

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230808-quizzical-footwork-4846d6461f74@spud \
    --to=conor@kernel.org \
    --cc=afaerber@suse.de \
    --cc=andy@kernel.org \
    --cc=brgl@bgdev.pl \
    --cc=catalin.marinas@arm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=duje.mihanovic@skole.hr \
    --cc=gpiccoli@igalia.com \
    --cc=keescook@chromium.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkundrak@v3.sk \
    --cc=mturquette@baylibre.com \
    --cc=phone-devel@vger.kernel.org \
    --cc=robert.jarzmik@free.fr \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=tony.luck@intel.com \
    --cc=will@kernel.org \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).