From: Flavio Suligoi <f.suligoi@asem.it>
To: u-boot@lists.denx.de
Subject: [PATCH] imx: distinguish POR from POR+WDOG reset cause for first wd
Date: Wed, 22 Jan 2020 15:17:36 +0100 [thread overview]
Message-ID: <1579702656-20667-1-git-send-email-f.suligoi@asem.it> (raw)
In some application the possibility to check if the reset
is caused by a watchdog is essential, even if it occurs
simultaneously with POR.
Signed-off-by: Flavio Suligoi <f.suligoi@asem.it>
---
arch/arm/mach-imx/cpu.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c
index bfa85c6..ce0c663 100644
--- a/arch/arm/mach-imx/cpu.c
+++ b/arch/arm/mach-imx/cpu.c
@@ -47,7 +47,6 @@ static char *get_reset_cause(void)
{
switch (get_imx_reset_cause()) {
case 0x00001:
- case 0x00011:
return "POR";
case 0x00004:
return "CSU";
@@ -59,6 +58,12 @@ static char *get_reset_cause(void)
#else
return "WDOG";
#endif
+ case 0x00011:
+#ifdef CONFIG_MX7
+ return "POR + WDOG1";
+#else
+ return "POR + WDOG";
+#endif
case 0x00020:
return "JTAG HIGH-Z";
case 0x00040:
--
2.7.4
next reply other threads:[~2020-01-22 14:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-22 14:17 Flavio Suligoi [this message]
2020-01-22 17:46 ` [PATCH] imx: distinguish POR from POR+WDOG reset cause for first wd Fabio Estevam
2020-01-23 8:22 ` Flavio Suligoi
2020-01-27 12:49 ` Peng Fan
2020-01-27 13:49 ` Flavio Suligoi
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=1579702656-20667-1-git-send-email-f.suligoi@asem.it \
--to=f.suligoi@asem.it \
--cc=u-boot@lists.denx.de \
/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.