|
@@ -51,6 +51,8 @@
|
|
/* The maximum TOP (timeout period) value that can be set in the watchdog. */
|
|
/* The maximum TOP (timeout period) value that can be set in the watchdog. */
|
|
#define DW_WDT_MAX_TOP 15
|
|
#define DW_WDT_MAX_TOP 15
|
|
|
|
|
|
|
|
+#define DW_WDT_DEFAULT_SECONDS 30
|
|
|
|
+
|
|
static bool nowayout = WATCHDOG_NOWAYOUT;
|
|
static bool nowayout = WATCHDOG_NOWAYOUT;
|
|
module_param(nowayout, bool, 0);
|
|
module_param(nowayout, bool, 0);
|
|
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started "
|
|
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)
|
|
if (!dw_wdt_is_enabled()) {
|
|
if (!dw_wdt_is_enabled()) {
|
|
/*
|
|
/*
|
|
* The watchdog is not currently enabled. Set the timeout to
|
|
* The watchdog is not currently enabled. Set the timeout to
|
|
- * the maximum and then start it.
|
|
|
|
|
|
+ * something reasonable and then start it.
|
|
*/
|
|
*/
|
|
- dw_wdt_set_top(DW_WDT_MAX_TOP);
|
|
|
|
|
|
+ dw_wdt_set_top(DW_WDT_DEFAULT_SECONDS);
|
|
writel(WDOG_CONTROL_REG_WDT_EN_MASK,
|
|
writel(WDOG_CONTROL_REG_WDT_EN_MASK,
|
|
dw_wdt.regs + WDOG_CONTROL_REG_OFFSET);
|
|
dw_wdt.regs + WDOG_CONTROL_REG_OFFSET);
|
|
}
|
|
}
|