aboutsummaryrefslogtreecommitdiff
path: root/drivers/watchdog/ath79_wdt.c
diff options
context:
space:
mode:
authorGary S. Robertson <gary.robertson@linaro.org>2014-07-16 17:57:27 -0500
committerGary S. Robertson <gary.robertson@linaro.org>2014-07-16 17:57:27 -0500
commit5d8c39dfa92c11553a1091717407aeaddc3de603 (patch)
tree0df1e82ebdde6b9e3722fd16f9195be36a73c144 /drivers/watchdog/ath79_wdt.c
parent0993b170ac452761d5b49bca4f7022f2f14c50bc (diff)
parentc0cbbdebe91a944d653ca75670b77bbf57498150 (diff)
Merge tag 'v3.14.12' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into linux-lng-v3.14.xlinux-lng-3.14.12-2014.07
This is the 3.14.12 stable release Conflicts: arch/arm/mm/proc-v7-3level.S kernel/hrtimer.c mm/hugetlb.c
Diffstat (limited to 'drivers/watchdog/ath79_wdt.c')
-rw-r--r--drivers/watchdog/ath79_wdt.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/watchdog/ath79_wdt.c b/drivers/watchdog/ath79_wdt.c
index 9fa1f69dac13..61098cd5439e 100644
--- a/drivers/watchdog/ath79_wdt.c
+++ b/drivers/watchdog/ath79_wdt.c
@@ -20,6 +20,7 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/init.h>
@@ -91,6 +92,15 @@ static inline void ath79_wdt_keepalive(void)
static inline void ath79_wdt_enable(void)
{
ath79_wdt_keepalive();
+
+ /*
+ * Updating the TIMER register requires a few microseconds
+ * on the AR934x SoCs at least. Use a small delay to ensure
+ * that the TIMER register is updated within the hardware
+ * before enabling the watchdog.
+ */
+ udelay(2);
+
ath79_wdt_wr(WDOG_REG_CTRL, WDOG_CTRL_ACTION_FCR);
/* flush write */
ath79_wdt_rr(WDOG_REG_CTRL);