* [PATCH] watchdog: i.MX: fix i.MX6 reset
@ 2017-06-12 7:00 Christian Hemp
2017-06-13 7:26 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Christian Hemp @ 2017-06-12 7:00 UTC (permalink / raw)
To: barebox
According to the Errata ERR004346 (WDOG: WDOG SRS bit requires to be written
twice), add another two writes to ensure there must be at least two
writes happen in the same one 32kHz clock period.
Without this two additional writes, the system will not reset always.
Tested with i.MX6Quad and i.MX6 UltraLite
Signed-off-by: Christian Hemp <c.hemp@phytec.de>
---
drivers/watchdog/imxwd.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/watchdog/imxwd.c b/drivers/watchdog/imxwd.c
index b920c72..0617fc6 100644
--- a/drivers/watchdog/imxwd.c
+++ b/drivers/watchdog/imxwd.c
@@ -134,6 +134,10 @@ static void imx21_soc_reset(struct imx_wd *priv)
val |= IMX21_WDOG_WCR_WDA; /* do not assert ext-reset */
writew(val, priv->base + IMX21_WDOG_WCR);
+
+ /* Two additional writes due to errata ERR004346 */
+ writew(val, priv->base + IMX21_WDOG_WCR);
+ writew(val, priv->base + IMX21_WDOG_WCR);
}
static int imx_watchdog_set_timeout(struct watchdog *wd, unsigned timeout)
--
1.9.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] watchdog: i.MX: fix i.MX6 reset
2017-06-12 7:00 [PATCH] watchdog: i.MX: fix i.MX6 reset Christian Hemp
@ 2017-06-13 7:26 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2017-06-13 7:26 UTC (permalink / raw)
To: Christian Hemp; +Cc: barebox
On Mon, Jun 12, 2017 at 09:00:35AM +0200, Christian Hemp wrote:
> According to the Errata ERR004346 (WDOG: WDOG SRS bit requires to be written
> twice), add another two writes to ensure there must be at least two
> writes happen in the same one 32kHz clock period.
> Without this two additional writes, the system will not reset always.
>
> Tested with i.MX6Quad and i.MX6 UltraLite
>
> Signed-off-by: Christian Hemp <c.hemp@phytec.de>
Applied, thanks
Sascha
> ---
> drivers/watchdog/imxwd.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/watchdog/imxwd.c b/drivers/watchdog/imxwd.c
> index b920c72..0617fc6 100644
> --- a/drivers/watchdog/imxwd.c
> +++ b/drivers/watchdog/imxwd.c
> @@ -134,6 +134,10 @@ static void imx21_soc_reset(struct imx_wd *priv)
> val |= IMX21_WDOG_WCR_WDA; /* do not assert ext-reset */
>
> writew(val, priv->base + IMX21_WDOG_WCR);
> +
> + /* Two additional writes due to errata ERR004346 */
> + writew(val, priv->base + IMX21_WDOG_WCR);
> + writew(val, priv->base + IMX21_WDOG_WCR);
> }
>
> static int imx_watchdog_set_timeout(struct watchdog *wd, unsigned timeout)
> --
> 1.9.1
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
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] 2+ messages in thread
end of thread, other threads:[~2017-06-13 7:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-12 7:00 [PATCH] watchdog: i.MX: fix i.MX6 reset Christian Hemp
2017-06-13 7:26 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox