From a6b26419bc62b370e9d9fccce505be41ad633ad8 Mon Sep 17 00:00:00 2001 From: Lucien Mueller Date: Wed, 15 Sep 2021 16:35:13 +0200 Subject: [PATCH] hw21: introduce cpu watchdog reset reason. BugzID: 74817 Signed-off-by: Lucien Mueller --- board/nm/nmhw21/board.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/board/nm/nmhw21/board.c b/board/nm/nmhw21/board.c index 678195e315..d827ae78b0 100644 --- a/board/nm/nmhw21/board.c +++ b/board/nm/nmhw21/board.c @@ -507,6 +507,14 @@ static void check_reset_reason(unsigned int reset_reason_shm_location) } } + /* CPU reset reason -> PRM_RSTST ; watchdog reset = 0x00000010*/ + int cpu_reset_reason = readl(PRM_RSTST); + if (cpu_reset_reason & 0x10) { + start_reason |= SR_WATCHDOG; + } + /* reset the reset reason register */ + writel(0x13, PRM_RSTST); + /* * Check Wakeup Events * Event Register A holds: