All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-renesas-soc@vger.kernel.org
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Magnus Damm <magnus.damm@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 5/5] WIP soc: v3u: allow WDT reset
Date: Fri, 18 Dec 2020 18:37:30 +0100	[thread overview]
Message-ID: <20201218173731.12839-6-wsa+renesas@sang-engineering.com> (raw)
In-Reply-To: <20201218173731.12839-1-wsa+renesas@sang-engineering.com>

Other Gen3 SoCs do this in the bootloader. Maybe V3U will also later?
For now, add it so we can properly reboot via remote.

Not to be applied yet, just for demonstration.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/soc/renesas/rcar-rst.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/soc/renesas/rcar-rst.c b/drivers/soc/renesas/rcar-rst.c
index 8a1e402ea799..d3364fe57150 100644
--- a/drivers/soc/renesas/rcar-rst.c
+++ b/drivers/soc/renesas/rcar-rst.c
@@ -12,6 +12,13 @@
 
 #define WDTRSTCR_RESET		0xA55A0002
 #define WDTRSTCR		0x0054
+#define V3U_WDTRSTCR		0x0010
+
+static int v3u_rst_enable_wdt_reset(void __iomem *base)
+{
+	iowrite32(WDTRSTCR_RESET, base + V3U_WDTRSTCR);
+	return 0;
+}
 
 static int rcar_rst_enable_wdt_reset(void __iomem *base)
 {
@@ -39,6 +46,7 @@ static const struct rst_config rcar_rst_gen3 __initconst = {
 
 static const struct rst_config rcar_rst_r8a779a0 __initconst = {
 	.modemr = 0x00,		/* MODEMR0 and it has CPG related bits */
+	.configure = v3u_rst_enable_wdt_reset,
 };
 
 static const struct of_device_id rcar_rst_matches[] __initconst = {
-- 
2.29.2


  parent reply	other threads:[~2020-12-18 17:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-18 17:37 [PATCH 0/5] v3u: add support for RWDT Wolfram Sang
2020-12-18 17:37 ` [PATCH 1/5] dt-bindings: watchdog: renesas,wdt: add r8a779a0 (V3U) support Wolfram Sang
2020-12-22  9:01   ` Geert Uytterhoeven
2020-12-31 20:36   ` Rob Herring
2021-01-18  8:57   ` Wolfram Sang
2021-01-23 17:20   ` Guenter Roeck
2020-12-18 17:37 ` [PATCH 2/5] clk: renesas: r8a779a0: Add RWDT clocks Wolfram Sang
2020-12-22  9:03   ` Geert Uytterhoeven
2020-12-18 17:37 ` [PATCH 3/5] arm64: dts: renesas: r8a779a0: Add RWDT node Wolfram Sang
2020-12-21 14:51   ` Wolfram Sang
2020-12-22  9:13   ` Geert Uytterhoeven
2020-12-22  9:16     ` Wolfram Sang
2020-12-18 17:37 ` [PATCH 4/5] arm64: dts: renesas: falcon: Enable watchdog timer Wolfram Sang
2020-12-22  9:14   ` Geert Uytterhoeven
2020-12-18 17:37 ` Wolfram Sang [this message]
2020-12-22  9:19   ` [PATCH 5/5] WIP soc: v3u: allow WDT reset 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=20201218173731.12839-6-wsa+renesas@sang-engineering.com \
    --to=wsa+renesas@sang-engineering.com \
    --cc=geert+renesas@glider.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@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 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.