aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/dw_wdt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c
index 9f210299de24..449c88523364 100644
--- a/drivers/watchdog/dw_wdt.c
+++ b/drivers/watchdog/dw_wdt.c
@@ -40,6 +40,7 @@
40#define WDOG_CONTROL_REG_OFFSET 0x00 40#define WDOG_CONTROL_REG_OFFSET 0x00
41#define WDOG_CONTROL_REG_WDT_EN_MASK 0x01 41#define WDOG_CONTROL_REG_WDT_EN_MASK 0x01
42#define WDOG_TIMEOUT_RANGE_REG_OFFSET 0x04 42#define WDOG_TIMEOUT_RANGE_REG_OFFSET 0x04
43#define WDOG_TIMEOUT_RANGE_TOPINIT_SHIFT 4
43#define WDOG_CURRENT_COUNT_REG_OFFSET 0x08 44#define WDOG_CURRENT_COUNT_REG_OFFSET 0x08
44#define WDOG_COUNTER_RESTART_REG_OFFSET 0x0c 45#define WDOG_COUNTER_RESTART_REG_OFFSET 0x0c
45#define WDOG_COUNTER_RESTART_KICK_VALUE 0x76 46#define WDOG_COUNTER_RESTART_KICK_VALUE 0x76
@@ -106,7 +107,8 @@ static int dw_wdt_set_top(unsigned top_s)
106 } 107 }
107 108
108 /* Set the new value in the watchdog. */ 109 /* Set the new value in the watchdog. */
109 writel(top_val, dw_wdt.regs + WDOG_TIMEOUT_RANGE_REG_OFFSET); 110 writel(top_val | top_val << WDOG_TIMEOUT_RANGE_TOPINIT_SHIFT,
111 dw_wdt.regs + WDOG_TIMEOUT_RANGE_REG_OFFSET);
110 112
111 dw_wdt_set_next_heartbeat(); 113 dw_wdt_set_next_heartbeat();
112 114