diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2012-08-12 12:48:28 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2012-08-12 12:48:28 +0000 |
commit | f5cbc0457a3f681de1a329531e50c711c479c412 (patch) | |
tree | 29e9aa40ae773085a689b2c571909c5617bc1192 /target | |
parent | a2ec9c876d0d3246b866edeef273b54d9f4dc8e9 (diff) | |
download | master-187ad058-f5cbc0457a3f681de1a329531e50c711c479c412.tar.gz master-187ad058-f5cbc0457a3f681de1a329531e50c711c479c412.tar.bz2 master-187ad058-f5cbc0457a3f681de1a329531e50c711c479c412.zip |
ramips: watchdog: use maximum possible timeout by default
As the userspace has no means to determine the maximum possible timeout, use
that as the default and let the userspace lower it when necessary.
As the result the usual OpenWrt install (with busybox's watchdog trying to set
the timeout to 60s on start) is using a 33s timeout on an RT3052 clocked at
384MHz instead of the current 20s default.
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33144 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/ramips/files/drivers/watchdog/ramips_wdt.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/target/linux/ramips/files/drivers/watchdog/ramips_wdt.c b/target/linux/ramips/files/drivers/watchdog/ramips_wdt.c index a0b56c8cb1..2350fab7c4 100644 --- a/target/linux/ramips/files/drivers/watchdog/ramips_wdt.c +++ b/target/linux/ramips/files/drivers/watchdog/ramips_wdt.c @@ -33,7 +33,7 @@ #define DRIVER_NAME "ramips-wdt" -#define RAMIPS_WDT_TIMEOUT 20 /* seconds */ +#define RAMIPS_WDT_TIMEOUT 0 /* seconds */ #define RAMIPS_WDT_PRESCALE 65536 #define TIMER_REG_TMRSTAT 0x00 @@ -59,7 +59,7 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started " static int ramips_wdt_timeout = RAMIPS_WDT_TIMEOUT; module_param_named(timeout, ramips_wdt_timeout, int, 0); -MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds " +MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds, 0 means use maximum " "(default=" __MODULE_STRING(RAMIPS_WDT_TIMEOUT) "s)"); static unsigned long ramips_wdt_flags; @@ -112,9 +112,9 @@ static inline void ramips_wdt_disable(void) static int ramips_wdt_set_timeout(int val) { if (val < 1 || val > ramips_wdt_max_timeout) { - pr_crit(DRIVER_NAME - ": timeout value %d must be 0 < timeout < %d\n", - val, ramips_wdt_max_timeout); + pr_warn(DRIVER_NAME + ": timeout value %d must be 0 < timeout <= %d, using %d\n", + val, ramips_wdt_max_timeout, ramips_wdt_timeout); return -EINVAL; } @@ -291,7 +291,7 @@ static int __devinit ramips_wdt_probe(struct platform_device *pdev) ramips_wdt_timeout > ramips_wdt_max_timeout) { ramips_wdt_timeout = ramips_wdt_max_timeout; dev_info(&pdev->dev, - "timeout value must be 0 < timeout < %d, using %d\n", + "timeout value must be 0 < timeout <= %d, using %d\n", ramips_wdt_max_timeout, ramips_wdt_timeout); } |