* [PATCH 1/2] ARM/MXS/i.MX28: recognize watchdog reset
@ 2015-03-27 19:23 Marc Kleine-Budde
2015-03-27 19:23 ` [PATCH 2/2] duckbill: fix PBL debug prefix Marc Kleine-Budde
2015-03-30 17:24 ` [PATCH 1/2] ARM/MXS/i.MX28: recognize watchdog reset Sascha Hauer
0 siblings, 2 replies; 3+ messages in thread
From: Marc Kleine-Budde @ 2015-03-27 19:23 UTC (permalink / raw)
To: barebox; +Cc: Steffen Trumtrar, sha
From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
When a watchdog timeout is set in the linux kernel, the FORCE_UPDATE bit is set.
Use this to recognize a system reset that was triggered by the watchdog.
Since only the wdt part of the kernel driver sets this bit, this is a safe
distinguishing feature.
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
drivers/watchdog/im28wd.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/watchdog/im28wd.c b/drivers/watchdog/im28wd.c
index 3e73ecd62e7c..a9093a7b51c9 100644
--- a/drivers/watchdog/im28wd.c
+++ b/drivers/watchdog/im28wd.c
@@ -176,6 +176,13 @@ static void __maybe_unused imx28_detect_reset_source(const struct imx28_wd *p)
reset_source_set(RESET_RST);
return;
}
+ reg = readl(p->regs + MXS_RTC_PERSISTENT1);
+ if (reg & MXS_RTC_PERSISTENT1_FORCE_UPDATER) {
+ writel(MXS_RTC_PERSISTENT1_FORCE_UPDATER,
+ p->regs + MXS_RTC_PERSISTENT1 + MXS_RTC_CLR_ADDR);
+ reset_source_set(RESET_WDG);
+ return;
+ }
reset_source_set(RESET_RST);
}
--
2.1.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] duckbill: fix PBL debug prefix
2015-03-27 19:23 [PATCH 1/2] ARM/MXS/i.MX28: recognize watchdog reset Marc Kleine-Budde
@ 2015-03-27 19:23 ` Marc Kleine-Budde
2015-03-30 17:24 ` [PATCH 1/2] ARM/MXS/i.MX28: recognize watchdog reset Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Marc Kleine-Budde @ 2015-03-27 19:23 UTC (permalink / raw)
To: barebox; +Cc: sha
From: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
arch/arm/boards/duckbill/lowlevel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boards/duckbill/lowlevel.c b/arch/arm/boards/duckbill/lowlevel.c
index 77d2e83aedd0..49563a0876e0 100644
--- a/arch/arm/boards/duckbill/lowlevel.c
+++ b/arch/arm/boards/duckbill/lowlevel.c
@@ -1,4 +1,4 @@
-#define pr_fmt(fmt) "Freescale MX28evk: " fmt
+#define pr_fmt(fmt) "I2SE Duckbill: " fmt
#define DEBUG
#include <common.h>
--
2.1.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] ARM/MXS/i.MX28: recognize watchdog reset
2015-03-27 19:23 [PATCH 1/2] ARM/MXS/i.MX28: recognize watchdog reset Marc Kleine-Budde
2015-03-27 19:23 ` [PATCH 2/2] duckbill: fix PBL debug prefix Marc Kleine-Budde
@ 2015-03-30 17:24 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2015-03-30 17:24 UTC (permalink / raw)
To: Marc Kleine-Budde; +Cc: barebox, Steffen Trumtrar
On Fri, Mar 27, 2015 at 08:23:11PM +0100, Marc Kleine-Budde wrote:
> From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
>
> When a watchdog timeout is set in the linux kernel, the FORCE_UPDATE bit is set.
> Use this to recognize a system reset that was triggered by the watchdog.
> Since only the wdt part of the kernel driver sets this bit, this is a safe
> distinguishing feature.
>
> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> ---
> drivers/watchdog/im28wd.c | 7 +++++++
> 1 file changed, 7 insertions(+)
Applied, thanks
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-30 17:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-27 19:23 [PATCH 1/2] ARM/MXS/i.MX28: recognize watchdog reset Marc Kleine-Budde
2015-03-27 19:23 ` [PATCH 2/2] duckbill: fix PBL debug prefix Marc Kleine-Budde
2015-03-30 17:24 ` [PATCH 1/2] ARM/MXS/i.MX28: recognize watchdog reset Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox