From: sashiko-bot@kernel.org
To: "Stefan Dösinger" <stefandoesinger@gmail.com>
Cc: devicetree@vger.kernel.org, olteanv@gmail.com, robh@kernel.org,
vkoul@kernel.org, neil.armstrong@linaro.org,
linux-phy@lists.infradead.org, conor+dt@kernel.org
Subject: Re: [PATCH v7 09/13] clk: zte: Introduce a driver for zx297520v3 top clocks
Date: Thu, 16 Jul 2026 22:42:41 +0000 [thread overview]
Message-ID: <20260716224241.BAFFF1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260717-zx29clk-v7-9-408411cfcf36@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Using `clk_main[0]` to initialize the `.parent` field in the `zx297520v3_top_gates` static array is a violation of ISO C rules for constant expressions, resulting in a hard compile error.
--
--- Patch [9]: [PATCH v7 09/13] clk: zte: Introduce a driver for zx297520v3 top clocks ---
commit 8a7fee3879cf08b60157cde425eed4bbaa05fcb1
Author: Stefan Dösinger <stefandoesinger@gmail.com>
clk: zte: Introduce a driver for zx297520v3 top clocks
This commit introduces a clock driver for the ZTE zx297520v3 SoC top clocks.
It supports core devices such as PLLs, the AHB bus, timers, the USB
controller, and the Cortex M0 processor.
> diff --git a/drivers/clk/zte/clk-zx297520v3.c b/drivers/clk/zte/clk-zx297520v3.c
> new file mode 100644
> index 0000000000000..20ff00ba5f670
> --- /dev/null
> +++ b/drivers/clk/zte/clk-zx297520v3.c
[ ... ]
> +static const struct zx_gate_desc zx297520v3_top_gates[] = {
[ ... ]
> + /* AHB clock gates: Disabling these cuts off the A53 from register access into 0x130000/
> + * 0x140000, including the topcrm region, so it can't be re-enabled. Mark them critical for
> + * that reason.
> + *
> + * Gating this off does not stop the M0 rproc, nor does it stop M0 from accessing topcrm. It
> + * does however gate off M0 from the AXI interconnect, so it can't read RAM, Matrix, etc. So
> + * these bits here merely gate the bus, not the actual devices.
> + */
> + GATE(ZX297520V3_AHB_PCLK, "ahb-pclk", "ahb-mux", 0x54, 12,
> + CLK_IS_CRITICAL),
> + GATE(ZX297520V3_AHB_WCLK, "ahb-wclk", "m0-mux", 0x54, 13,
> + CLK_IS_CRITICAL),
> +
> + /* SRAM1 and 2 clocks. Leave them on for now, as turning them off carelessly hangs the M0 */
> + GATE(ZX297520V3_SRAM1_PCLK, "sram1-pclk", clk_main[0], 0x54, 18,
> + CLK_IS_CRITICAL),
[Severity: Low]
Does using clk_main[0] to initialize elements of a static array cause a build
failure?
In C, array accesses are not treated as constant expressions. Initializing the
zx297520v3_top_gates static array with clk_main[0] will cause the compiler
to fail with an "initializer element is not constant" error.
Could a string literal like "clock-26m" be used directly instead?
> + GATE(ZX297520V3_SRAM2_PCLK, "sram2-pclk", clk_main[0], 0x54, 16,
> + CLK_IS_CRITICAL),
> +
> + /* Pinmux (AON, TOP, IOCFG but not PDCFG). Critical as well until we have a driver that
> + * consumes it. I don't think we'll realistically shut this off ever.
> + *
> + * Setting either bit 0 or 1 in register 0x58 makes the device work.
> + */
> + GATE(ZX297520V3_PMM_WCLK, "pmm-wclk", clk_main[0], 0x58, 0,
> + CLK_IS_CRITICAL),
> + GATE(ZX297520V3_PMM_PCLK, "pmm-pclk", clk_main[0], 0x58, 1,
> + CLK_IS_CRITICAL),
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260717-zx29clk-v7-0-408411cfcf36@gmail.com?part=9
next prev parent reply other threads:[~2026-07-16 22:42 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 21:35 [PATCH v7 00/13] ZTE zx297520v3 clock bindings and driver Stefan Dösinger
2026-07-16 21:35 ` [PATCH v7 01/13] dt-bindings: phy: Add zx297520v3 USB phy documentation Stefan Dösinger
2026-07-16 22:24 ` sashiko-bot
2026-07-17 0:05 ` Rob Herring (Arm)
2026-07-16 21:35 ` [PATCH v7 02/13] dt-bindings: clk: zte: Add zx297520v3 top clock and reset controller Stefan Dösinger
2026-07-17 0:05 ` Rob Herring (Arm)
2026-07-16 21:35 ` [PATCH v7 03/13] dt-bindings: clk: zte: Add zx297520v3 matrix " Stefan Dösinger
2026-07-16 22:25 ` sashiko-bot
2026-07-16 21:35 ` [PATCH v7 04/13] dt-bindings: clk: zte: Add zx297520v3 LSP " Stefan Dösinger
2026-07-16 21:35 ` [PATCH v7 05/13] mfd: zx297520v3: Add a clock and reset MFD driver Stefan Dösinger
2026-07-16 22:24 ` sashiko-bot
2026-07-16 21:35 ` [PATCH v7 06/13] clk: zte: Add Clock registration infrastructure Stefan Dösinger
2026-07-16 22:26 ` sashiko-bot
2026-07-16 21:35 ` [PATCH v7 07/13] clk: zte: Add regmap based clocks Stefan Dösinger
2026-07-16 21:35 ` [PATCH v7 08/13] clk: zte: Add zx PLL support infrastructure Stefan Dösinger
2026-07-16 22:34 ` sashiko-bot
2026-07-16 21:35 ` [PATCH v7 09/13] clk: zte: Introduce a driver for zx297520v3 top clocks Stefan Dösinger
2026-07-16 22:42 ` sashiko-bot [this message]
2026-07-16 22:00 ` [PATCH v7 13/13] ARM: dts: zte: Declare zx297520v3 CRM device nodes Stefan Dösinger
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=20260716224241.BAFFF1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=neil.armstrong@linaro.org \
--cc=olteanv@gmail.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=stefandoesinger@gmail.com \
--cc=vkoul@kernel.org \
/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