From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: khendry@reliablecontrols.com
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
Stephen Boyd <sboyd@kernel.org>,
Brian Masney <bmasney+clk@redhat.com>,
Jerome Brunet <jbrunet+clk@baylibre.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Magnus Damm <magnus.damm@gmail.com>,
Fabrizio Castro <fabrizio.castro.jz@renesas.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] clk: renesas: r9a06g032: Add reset controller
Date: Fri, 20 Nov 2026 23:17:17 +0100 [thread overview]
Message-ID: <awDG6bClCPgRO3ZN@shikoro> (raw)
In-Reply-To: <20261120-rzn1-miic-resets-v2-2-f1cfa678615b@reliablecontrols.com>
[-- Attachment #1: Type: text/plain, Size: 1283 bytes --]
> > +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.
Seems like starting from 0 is the better (and easier) option after all.
> [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.
I agree.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-11-20 22:17 UTC|newest]
Thread overview: 11+ 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
2026-11-20 22:17 ` Wolfram Sang [this message]
2026-11-20 22:24 ` Wolfram Sang
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=awDG6bClCPgRO3ZN@shikoro \
--to=wsa+renesas@sang-engineering.com \
--cc=bmasney+clk@redhat.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=fabrizio.castro.jz@renesas.com \
--cc=geert+renesas@glider.be \
--cc=jbrunet+clk@baylibre.com \
--cc=khendry@reliablecontrols.com \
--cc=krzk+dt@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=sboyd@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 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.