1 From 156560a512a39284148d556ab96e2e833e816666 Mon Sep 17 00:00:00 2001
2 From: Gabor Juhos <juhosg@openwrt.org>
3 Date: Fri, 23 Dec 2011 19:25:42 +0100
4 Subject: [PATCH 27/27] watchdog: ath79_wdt: flush register writes
6 The watchdog register writes required to have a flush
7 in order to commit the values to the register. Without
8 the flush, the driver not function correctly on AR934X
11 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
12 Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
13 Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 drivers/watchdog/ath79_wdt.c | 6 ++++++
16 1 files changed, 6 insertions(+), 0 deletions(-)
18 --- a/drivers/watchdog/ath79_wdt.c
19 +++ b/drivers/watchdog/ath79_wdt.c
20 @@ -68,17 +68,23 @@ static int max_timeout;
21 static inline void ath79_wdt_keepalive(void)
23 ath79_reset_wr(AR71XX_RESET_REG_WDOG, wdt_freq * timeout);
25 + ath79_reset_rr(AR71XX_RESET_REG_WDOG);
28 static inline void ath79_wdt_enable(void)
30 ath79_wdt_keepalive();
31 ath79_reset_wr(AR71XX_RESET_REG_WDOG_CTRL, WDOG_CTRL_ACTION_FCR);
33 + ath79_reset_rr(AR71XX_RESET_REG_WDOG_CTRL);
36 static inline void ath79_wdt_disable(void)
38 ath79_reset_wr(AR71XX_RESET_REG_WDOG_CTRL, WDOG_CTRL_ACTION_NONE);
40 + ath79_reset_rr(AR71XX_RESET_REG_WDOG_CTRL);
43 static int ath79_wdt_set_timeout(int val)