From: sashiko-bot@kernel.org
To: "Stefan Dösinger" <stefandoesinger@gmail.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v6 08/12] clk: zte: Introduce a driver for zx297520v3 top clocks
Date: Thu, 02 Jul 2026 20:41:12 +0000 [thread overview]
Message-ID: <20260702204113.478D31F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260702-zx29clk-v6-8-377b704f80c4@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The PLLs `unknownpll` and `dpll` will be improperly orphaned by the common clock framework if the hardware boots with alternate parent indices.
--
commit b48ea22652716b42ff4252581eeabf1b55dc958b
Author: Stefan Dösinger <stefandoesinger@gmail.com>
clk: zte: Introduce a driver for zx297520v3 top clocks
This commit introduces a driver for the ZTE zx297520v3 top clock
register space. It provides clock control for core devices including
PLLs, the AHB bus, timers, and the USB controller.
> diff --git a/drivers/clk/zte/clk-zx297520v3.c b/drivers/clk/zte/clk-zx297520v3.c
> new file mode 100644
> index 0000000000000..6fc98f98cf9c8
> --- /dev/null
> +++ b/drivers/clk/zte/clk-zx297520v3.c
[ ... ]
> +static const char * const dpll_parents[] = {
> + "unknownpll_d2",
> + "osc26m",
> +};
[Severity: Medium]
The comment further below for dpll mentions it accepts parent values 0, 1, 2,
and 3. If the bootloader leaves the hardware configured to use parent index 2
or 3, will the common clock framework treat this as an out-of-bounds index and
orphan the clock?
If CCF treats it as orphaned, the parent rate passed to the recalc_rate hook
will be 0, leading to a 0 Hz clock rate for dpll and all its descendants.
Could we expand this array to include the alias parents to prevent this?
[ ... ]
> + /* Default value 0x4834902d. Feeds dpll. 46.08 MHz. Bit 25 can be set, so two parents are
> + * possible. It looks like both values select the 26 MHz oscillator though.
> + */
> + {
> + .id = 0,
> + .name = "unknownpll",
> + .parents = clk_main,
> + .num_parents = ARRAY_SIZE(clk_main),
[Severity: Medium]
Since clk_main only has one entry, num_parents will be 1. If bit 25 is set by
the bootloader, the hardware could return parent index 1.
Would that cause the same CCF orphaning issue here, where an out-of-bounds
index results in a 0 Hz calculated rate for unknownpll and dependent devices?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260702-zx29clk-v6-0-377b704f80c4@gmail.com?part=8
next prev parent reply other threads:[~2026-07-02 20:41 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 20:27 [PATCH v6 00/12] ZTE zx297520v3 clock bindings and driver Stefan Dösinger
2026-07-02 20:27 ` [PATCH v6 01/12] dt-bindings: soc: zte: Add zx297520v3 top clock and reset bindings Stefan Dösinger
2026-07-03 6:03 ` Krzysztof Kozlowski
2026-07-03 6:26 ` Krzysztof Kozlowski
2026-07-03 17:20 ` Stefan Dösinger
2026-07-04 8:35 ` Krzysztof Kozlowski
2026-07-02 20:27 ` [PATCH v6 02/12] dt-bindings: soc: zte: Add zx297520v3 matrix " Stefan Dösinger
2026-07-03 6:07 ` Krzysztof Kozlowski
2026-07-02 20:27 ` [PATCH v6 03/12] dt-bindings: clk: zte: Add zx297520v3 LSP " Stefan Dösinger
2026-07-02 20:27 ` [PATCH v6 04/12] mfd: zx297520v3: Add a clock and reset MFD driver Stefan Dösinger
2026-07-02 20:28 ` [PATCH v6 05/12] clk: zte: Add Clock registration infrastructure Stefan Dösinger
2026-07-02 20:28 ` [PATCH v6 06/12] clk: zte: Add regmap based clocks Stefan Dösinger
2026-07-02 20:28 ` [PATCH v6 07/12] clk: zte: Add zx PLL support infrastructure Stefan Dösinger
2026-07-02 20:50 ` sashiko-bot
2026-07-02 20:28 ` [PATCH v6 08/12] clk: zte: Introduce a driver for zx297520v3 top clocks Stefan Dösinger
2026-07-02 20:41 ` sashiko-bot [this message]
2026-07-02 20:28 ` [PATCH v6 09/12] clk: zte: Introduce a driver for zx297520v3 matrix clocks Stefan Dösinger
2026-07-02 20:47 ` sashiko-bot
2026-07-02 20:28 ` [PATCH v6 10/12] clk: zte: Introduce a driver for zx297520v3 LSP clocks Stefan Dösinger
2026-07-02 20:28 ` [PATCH v6 11/12] reset: zte: Add a zx297520v3 reset driver Stefan Dösinger
2026-07-02 20:49 ` sashiko-bot
2026-07-03 9:16 ` Philipp Zabel
2026-07-03 16:19 ` Stefan Dösinger
2026-07-02 20:28 ` [PATCH v6 12/12] ARM: dts: zte: Declare zx297520v3 CRM device nodes Stefan Dösinger
2026-07-02 20:47 ` sashiko-bot
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=20260702204113.478D31F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=stefandoesinger@gmail.com \
/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