From: sashiko-bot@kernel.org
To: Prabhakar <prabhakar.csengg@gmail.com>
Cc: linux-watchdog@vger.kernel.org, wsa+renesas@sang-engineering.com,
devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH RFC v2 7/9] watchdog: rzv2h: Add syscon support for RZ/T2H and RZ/N2H WDT control register
Date: Thu, 02 Jul 2026 12:42:51 +0000 [thread overview]
Message-ID: <20260702124252.8C1B51F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260702123112.161160-8-prabhakar.mahadev-lad.rj@bp.renesas.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The error rollback path in `rzv2h_wdt_stop()` leaves the watchdog deasserted but unconfigured, breaking the hardware state machine and potentially causing spurious resets.
--
commit e9173a2a019341cec05cdc87e042bd8dd2f92721
Author: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
watchdog: rzv2h: Add syscon support for RZ/T2H and RZ/N2H WDT control register
On RZ/T2H and RZ/N2H SoCs, the WDTDCR register is shared and managed by a
dedicated SYS driver. This commit updates the WDT driver to support a syscon
regmap interface for WDTDCR control while maintaining backward compatibility
with direct mapping.
> diff --git a/drivers/watchdog/rzv2h_wdt.c b/drivers/watchdog/rzv2h_wdt.c
> index e9545b8f5fd09..e14ff853a4e9f 100644
> --- a/drivers/watchdog/rzv2h_wdt.c
> +++ b/drivers/watchdog/rzv2h_wdt.c
[ ... ]
> @@ -179,8 +208,13 @@ static int rzv2h_wdt_stop(struct watchdog_device *wdev)
> if (ret)
> return ret;
>
> - if (priv->of_data->wdtdcr)
> - rzt2h_wdt_wdtdcr_count_stop(priv);
> + if (priv->of_data->wdtdcr) {
> + ret = rzt2h_wdt_wdtdcr_count_stop(priv);
> + if (ret) {
> + reset_control_deassert(priv->rstc);
> + return ret;
> + }
> + }
[Severity: High]
When rzt2h_wdt_wdtdcr_count_stop() fails, this rollback path deasserts the
reset line and returns an error without reconfiguring the hardware.
Because rzv2h_wdt_stop() returns an error, the watchdog subsystem will keep
the device marked as active and continue pinging it via rzv2h_wdt_ping().
Since the earlier reset_control_assert() wiped the configuration registers,
will the subsequent ping lock the unconfigured control registers and
potentially cause an immediate spurious system reset?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260702123112.161160-1-prabhakar.mahadev-lad.rj@bp.renesas.com?part=7
next prev parent reply other threads:[~2026-07-02 12:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 12:31 [PATCH RFC v2 0/9] Add System Controller support for RZ/T2H and RZ/N2H SoCs Prabhakar
2026-07-02 12:31 ` [PATCH RFC v2 1/9] dt-bindings: clock: renesas,cpg-mssr: Support RZ/T2H system controllers Prabhakar
2026-07-02 12:38 ` sashiko-bot
2026-07-02 12:31 ` [PATCH RFC v2 2/9] clk: renesas: r9a09g077: Add SYSC regmap support Prabhakar
2026-07-02 12:48 ` sashiko-bot
2026-07-02 12:31 ` [PATCH RFC v2 3/9] arm64: dts: renesas: r9a09g077: Add system controller child nodes Prabhakar
2026-07-02 12:31 ` [PATCH RFC v2 4/9] arm64: dts: renesas: r9a09g087: " Prabhakar
2026-07-02 12:31 ` [PATCH RFC v2 5/9] dt-bindings: watchdog: renesas,r9a09g057-wdt: Add SYS syscon support Prabhakar
2026-07-02 12:38 ` sashiko-bot
2026-07-02 12:31 ` [PATCH RFC v2 6/9] watchdog: rzv2h: Refactor WDTDCR start/stop handling Prabhakar
2026-07-02 12:31 ` [PATCH RFC v2 7/9] watchdog: rzv2h: Add syscon support for RZ/T2H and RZ/N2H WDT control register Prabhakar
2026-07-02 12:42 ` sashiko-bot [this message]
2026-07-02 13:27 ` Guenter Roeck
2026-07-02 15:12 ` Lad, Prabhakar
2026-07-02 12:31 ` [PATCH RFC v2 8/9] arm64: dts: renesas: r9a09g077: Use SYS syscon for WDTDCR access Prabhakar
2026-07-02 12:44 ` sashiko-bot
2026-07-02 12:31 ` [PATCH RFC v2 9/9] arm64: dts: renesas: r9a09g087: " Prabhakar
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=20260702124252.8C1B51F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=prabhakar.csengg@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox