From: sashiko-bot@kernel.org
To: "Kyle Hendry" <khendry@reliablecontrols.com>
Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org,
wsa+renesas@sang-engineering.com
Subject: Re: [PATCH v2 2/3] clk: renesas: r9a06g032: Add reset controller
Date: Fri, 20 Nov 2026 21:32:40 +0000 [thread overview]
Message-ID: <sashiko-outbox-226194@kernel.org> (raw)
In-Reply-To: <20261120-rzn1-miic-resets-v2-2-f1cfa678615b@reliablecontrols.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] clk: renesas: r9a06g032: unpopulated index 0 in
r9a06g032_resets
- [Medium] clk: renesas: r9a06g032: missing RESET_CONTROLLER Kconfig
selection
--
commit 2cc290ce9843c419fbe880756a7ccf01089df58d
Author: Kyle Hendry <khendry@reliablecontrols.com>
clk: renesas: r9a06g032: Add reset controller
This commit registers a reset controller in the R9A06G032 clock driver to
expose the timestamp and RGMII/RMII converter reset bits in the
PWRCTRL_SWITCHCTRL register.
> diff --git a/drivers/clk/renesas/r9a06g032-clocks.c b/drivers/clk/renesas/r9a06g032-clocks.c
> index 3df3f2b2c6de7..a474302987aa6 100644
> --- a/drivers/clk/renesas/r9a06g032-clocks.c
> +++ b/drivers/clk/renesas/r9a06g032-clocks.c
[ ... ]
> @@ -675,7 +676,13 @@ static const struct r9a06g032_clkdesc r9a06g032_clocks[] = {
> RB(0xec, 16), RB(0xec, 17), RB(0xec, 18), RB(0xec, 19)),
> };
>
> +static const struct regbit r9a06g032_resets[] = {
> + [R9A06G032_RST_TS] = RB(0x188, 3),
> + [R9A06G032_RST_MIIC] = RB(0x188, 4),
> +};
[Severity: Medium]
Since R9A06G032_RST_TS is 1 and R9A06G032_RST_MIIC is 2, can reset ID 0 be
requested and accepted even though r9a06g032_resets[0] is unpopulated?
ARRAY_SIZE(r9a06g032_resets) is 3, and without a custom xlate callback,
fwnode_reset_simple_xlate() allows index 0. If a consumer requests reset
0, assert and deassert silently become no-ops in clk_rdesc_set(), while
r9a06g032_reset_status() calls clk_rdesc_get() with { .bit = 0, .reg = 0 }
and reads bit 0 of offset 0x00 (R9A06G032_SYSCTRL_USB).
Either the reset IDs should be 0-based, or the driver should provide an
xlate callback that rejects unpopulated entries where !reg && !bit.
[ ... ]
> @@ -1394,6 +1446,13 @@ static int __init r9a06g032_clocks_probe(struct platform_device *pdev)
> if (error)
> return error;
>
> + clocks->rcdev.ops = &r9a06g032_reset_ops;
> + clocks->rcdev.of_node = np;
> + clocks->rcdev.nr_resets = ARRAY_SIZE(r9a06g032_resets);
> + error = devm_reset_controller_register(dev, &clocks->rcdev);
> + if (error)
> + return error;
[Severity: Medium]
Should CLK_R9A06G032 select RESET_CONTROLLER in
drivers/clk/renesas/Kconfig?
When CONFIG_RESET_CONTROLLER is disabled, devm_reset_controller_register()
compiles to a no-op stub returning 0, so the reset controller is never
registered and consumers such as pcs-rzn1-miic fail probe with
-EOPNOTSUPP.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261120-rzn1-miic-resets-v2-0-f1cfa678615b@reliablecontrols.com?part=2
next prev parent reply other threads:[~2026-11-20 21:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 21:16 [PATCH v2 0/3] clk: renesas: r9a06g032: Add reset controller to clear resets for mii converter Kyle Hendry
2026-11-20 21:16 ` Kyle Hendry via B4 Relay
2026-11-20 21:16 ` [PATCH v2 1/3] dt-bindings: clock: r9a06g032-sysctrl: Document reset cells Kyle Hendry
2026-11-20 21:16 ` Kyle Hendry via B4 Relay
2026-11-20 21:16 ` [PATCH v2 2/3] clk: renesas: r9a06g032: Add reset controller Kyle Hendry
2026-11-20 21:16 ` Kyle Hendry via B4 Relay
2026-11-20 21:32 ` sashiko-bot [this message]
2026-11-20 21:16 ` [PATCH v2 3/3] ARM: dts: renesas: r9a06g032: Add #reset-cells to system controller node Kyle Hendry
2026-11-20 21:16 ` Kyle Hendry via B4 Relay
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=sashiko-outbox-226194@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=khendry@reliablecontrols.com \
--cc=linux-clk@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=wsa+renesas@sang-engineering.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.