summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorMarkus Pargmann <mpa@pengutronix.de>2015-04-09 15:31:56 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-04-13 08:35:54 +0200
commit4cc0a3d9c547b452755ae2c0300d601473696591 (patch)
tree7f8fcbcef23a1fcea421a31bf63f007f2c24ba7e /drivers/watchdog
parent564a6092bad55616b21551b3d418e108998966dd (diff)
downloadbarebox-4cc0a3d9c547b452755ae2c0300d601473696591.tar.gz
wdog: imx-wd: Disable watchdog powerdown counter
Disable the watchdog powerdown counter at start. Otherwise this may trigger a reset or poweroff over the WDOG_B line to a PMIC. This counter is set to 16 seconds after poweron. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/imxwd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/watchdog/imxwd.c b/drivers/watchdog/imxwd.c
index 6e9edd9..221ad93 100644
--- a/drivers/watchdog/imxwd.c
+++ b/drivers/watchdog/imxwd.c
@@ -46,6 +46,7 @@ struct imx_wd {
#define IMX21_WDOG_WCR 0x00 /* Watchdog Control Register */
#define IMX21_WDOG_WSR 0x02 /* Watchdog Service Register */
#define IMX21_WDOG_WSTR 0x04 /* Watchdog Status Register */
+#define IMX21_WDOG_WMCR 0x08 /* Misc Register */
#define IMX21_WDOG_WCR_WDE (1 << 2)
#define IMX21_WDOG_WCR_SRS (1 << 4)
#define IMX21_WDOG_WCR_WDA (1 << 5)
@@ -158,6 +159,11 @@ static int imx21_wd_init(struct imx_wd *priv)
{
imx_watchdog_detect_reset_source(priv);
+ /*
+ * Disable watchdog powerdown counter
+ */
+ writew(0x0, priv->base + IMX21_WDOG_WMCR);
+
return 0;
}