From patchwork Fri Jan 10 11:47:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Holger Brunck X-Patchwork-Id: 239405 List-Id: U-Boot discussion From: holger.brunck at ch.abb.com (Holger Brunck) Date: Fri, 10 Jan 2020 12:47:43 +0100 Subject: [PATCH 3/3] km/common: fix for CPUWD reset reason In-Reply-To: <20200110114743.3660-1-holger.brunck@ch.abb.com> References: <20200110114743.3660-1-holger.brunck@ch.abb.com> Message-ID: <20200110114743.3660-3-holger.brunck@ch.abb.com> From: Rainer Boschung The CPUWD reset reason is used for kmp204x. And the qrio cpu reset request is configured to operate in core reset mode. But for the evaluation of the qrio's reset reason register the CPUWD figures as a unit reset source rather than a core reset source. This patch defines the CPUWD reset as a core reset source when evaluating the reset reason register. Signed-off-by: Rainer Boschung CC: Priyanka Jain --- board/keymile/common/qrio.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/board/keymile/common/qrio.c b/board/keymile/common/qrio.c index 0641ffa8b2..0cb33663aa 100644 --- a/board/keymile/common/qrio.c +++ b/board/keymile/common/qrio.c @@ -199,10 +199,9 @@ void qrio_cpuwd_flag(bool flag) #define REASON0_KBRST 0x02 #define REASON0_POWUP 0x01 #define UNIT_RESET\ - ((REASON1_CPUWD << 8) |\ - REASON0_POWUP | REASON0_COPRST | REASON0_KBRST |\ - REASON0_BPRST | REASON0_SWURST | REASON0_WDRST) -#define CORE_RESET REASON0_SWCRST + (REASON0_POWUP | REASON0_COPRST | REASON0_KBRST |\ + REASON0_BPRST | REASON0_SWURST | REASON0_WDRST) +#define CORE_RESET ((REASON1_CPUWD << 8) | REASON0_SWCRST) bool qrio_reason_unitrst(void) {