From: "Herve Codina (Schneider Electric)" <herve.codina@bootlin.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>
Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org,
Pascal Eberhard <pascal.eberhard@se.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
"Herve Codina (Schneider Electric)" <herve.codina@bootlin.com>
Subject: [PATCH v3 1/1] clk: renesas: r9a06g032: Enable watchdog reset sources
Date: Tue, 24 Mar 2026 13:04:30 +0100 [thread overview]
Message-ID: <20260324120435.243641-2-herve.codina@bootlin.com> (raw)
In-Reply-To: <20260324120435.243641-1-herve.codina@bootlin.com>
The watchdog timeout is signaled using an interrupt and, on this
interrupt, a software initiated reset is performed.
This software initiated reset performs, in the end, a hardware system
reset using SWRST_REQ of RSTCTRL register.
The watchdog itself is able to control directly the hardware system
reset without any operation done by the interrupt handler. This feature
allows the watchdog to not depend on the software to reset the system
when a watchdog timeout occurs.
Indeed, when the watchdog timeout occurs, the watchdog requests a system
reset using its own hardware dedicated line but this reset source is
disabled at the reset controller level.
To benefit of this feature and be robust against software issues, enable
watchdogs reset sources.
Suggested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Herve Codina (Schneider Electric) <herve.codina@bootlin.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/clk/renesas/r9a06g032-clocks.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/renesas/r9a06g032-clocks.c b/drivers/clk/renesas/r9a06g032-clocks.c
index 7407a4183a6c..2bed88e09ce6 100644
--- a/drivers/clk/renesas/r9a06g032-clocks.c
+++ b/drivers/clk/renesas/r9a06g032-clocks.c
@@ -1342,8 +1342,9 @@ static int __init r9a06g032_clocks_probe(struct platform_device *pdev)
/* Clear potentially pending resets */
writel(R9A06G032_SYSCTRL_WDA7RST_0 | R9A06G032_SYSCTRL_WDA7RST_1,
clocks->reg + R9A06G032_SYSCTRL_RSTCTRL);
- /* Allow software reset */
- writel(R9A06G032_SYSCTRL_SWRST | R9A06G032_SYSCTRL_RSTEN_MRESET_EN,
+ /* Allow watchdogs and software resets */
+ writel(R9A06G032_SYSCTRL_WDA7RST_0 | R9A06G032_SYSCTRL_WDA7RST_1 |
+ R9A06G032_SYSCTRL_SWRST | R9A06G032_SYSCTRL_RSTEN_MRESET_EN,
clocks->reg + R9A06G032_SYSCTRL_RSTEN);
error = devm_register_sys_off_handler(dev, SYS_OFF_MODE_RESTART, SYS_OFF_PRIO_HIGH,
--
2.53.0
next prev parent reply other threads:[~2026-03-24 12:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-24 12:04 [PATCH v3 0/1] watchdog: rzn1: Add support for direct hardware reset Herve Codina (Schneider Electric)
2026-03-24 12:04 ` Herve Codina (Schneider Electric) [this message]
2026-03-25 12:45 ` [PATCH v3 1/1] clk: renesas: r9a06g032: Enable watchdog reset sources Geert Uytterhoeven
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=20260324120435.243641-2-herve.codina@bootlin.com \
--to=herve.codina@bootlin.com \
--cc=geert+renesas@glider.be \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=miquel.raynal@bootlin.com \
--cc=mturquette@baylibre.com \
--cc=pascal.eberhard@se.com \
--cc=sboyd@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
--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