diff options
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/dw_wdt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c index 3dde6de117fa..d0bb9499d12c 100644 --- a/drivers/watchdog/dw_wdt.c +++ b/drivers/watchdog/dw_wdt.c | |||
@@ -51,6 +51,8 @@ | |||
51 | /* The maximum TOP (timeout period) value that can be set in the watchdog. */ | 51 | /* The maximum TOP (timeout period) value that can be set in the watchdog. */ |
52 | #define DW_WDT_MAX_TOP 15 | 52 | #define DW_WDT_MAX_TOP 15 |
53 | 53 | ||
54 | #define DW_WDT_DEFAULT_SECONDS 30 | ||
55 | |||
54 | static bool nowayout = WATCHDOG_NOWAYOUT; | 56 | static bool nowayout = WATCHDOG_NOWAYOUT; |
55 | module_param(nowayout, bool, 0); | 57 | module_param(nowayout, bool, 0); |
56 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started " | 58 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started " |
@@ -179,9 +181,9 @@ static int dw_wdt_open(struct inode *inode, struct file *filp) | |||
179 | if (!dw_wdt_is_enabled()) { | 181 | if (!dw_wdt_is_enabled()) { |
180 | /* | 182 | /* |
181 | * The watchdog is not currently enabled. Set the timeout to | 183 | * The watchdog is not currently enabled. Set the timeout to |
182 | * the maximum and then start it. | 184 | * something reasonable and then start it. |
183 | */ | 185 | */ |
184 | dw_wdt_set_top(DW_WDT_MAX_TOP); | 186 | dw_wdt_set_top(DW_WDT_DEFAULT_SECONDS); |
185 | writel(WDOG_CONTROL_REG_WDT_EN_MASK, | 187 | writel(WDOG_CONTROL_REG_WDT_EN_MASK, |
186 | dw_wdt.regs + WDOG_CONTROL_REG_OFFSET); | 188 | dw_wdt.regs + WDOG_CONTROL_REG_OFFSET); |
187 | } | 189 | } |