lkml.org 
[lkml]   [2020]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 5/5] WIP soc: v3u: allow WDT reset
Date
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
\
 
 \ /
  Last update: 2020-12-18 18:40    [W:0.161 / U:1.716 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site