diff options
author | Christian Hemp <c.hemp@phytec.de> | 2017-06-12 09:00:35 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-06-13 09:26:30 +0200 |
commit | f1a9f24ecddb6e6b55a96fb971128afa8427d25f (patch) | |
tree | 242852248577889edd5703d47c32d0d002ca824c /drivers | |
parent | 47c7e0672d67f84e3a875ba5250f2db48f3ec802 (diff) | |
download | barebox-f1a9f24ecddb6e6b55a96fb971128afa8427d25f.tar.gz barebox-f1a9f24ecddb6e6b55a96fb971128afa8427d25f.tar.xz |
watchdog: i.MX: fix i.MX6 reset
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>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/watchdog/imxwd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/watchdog/imxwd.c b/drivers/watchdog/imxwd.c index b920c7234b..0617fc6c42 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) |