watchdog: w83627hf_wdt: Add early_disable module parameter
Guenter Roeck
maintainerPATCH 1/2 watchdog: w83627hf_wdt: Add early_disable module parameter
Add early_disable module parameter to match functionality previously available in the w83697hf_wdt driver.
--- drivers/watchdog/w83627hf_wdt.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
drivers/watchdog/w83627hf_wdt.c +12 -3
@@ -64,6 +64,10 @@ MODULE_PARM_DESC(nowayout,"Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); +static int early_disable; +module_param (early_disable, int,0 ); +MODULE_PARM_DESC (early_disable,"Disable watchdog at boot time (default=0)" ); +/* * Kernel methods. */
@@ -208,9 +212,14 @@ static int w83627hf_init(struct watchdog_device *wdog, enum chips chip) t =superio_inb (cr_wdt_timeout);if (t !=0 ) { -pr_info ("Watchdog already running. Resetting timeout to %d sec\n" , - wdog->timeout); -superio_outb (cr_wdt_timeout, wdog->timeout); +if (early_disable) { +pr_warn ("Stopping previously enabled watchdog until userland kicks in\n" ); +superio_outb (cr_wdt_timeout,0 ); + }else { +pr_info ("Watchdog already running. Resetting timeout to %d sec\n" , + wdog->timeout); +superio_outb (cr_wdt_timeout, wdog->timeout); + } }/* set second mode & disable keyboard turning off watchdog */
Signature · 1 line
1.7.9.7
Guenter Roeck
maintainerPATCH v3 2/2 watchdog: Remove drivers for W83697HF and W83697UG
Since both chips are now supported by the w83627hf watchdog driver, the chip specific drivers are no longer needed and can be removed.
---
v3: rebase to latest upstream kernel
v2: resend, no change to v1
drivers/watchdog/Kconfig | 30 --- drivers/watchdog/Makefile | 2 - drivers/watchdog/w83697hf_wdt.c | 460 --------------------------------------- drivers/watchdog/w83697ug_wdt.c | 397 --------------------------------- 4 files changed, 889 deletions(-) delete mode 100644 drivers/watchdog/w83697hf_wdt.c delete mode 100644 drivers/watchdog/w83697ug_wdt.c
drivers/watchdog/Kconfig +0 -30
@@ -939,36 +939,6 @@ config W83627HF_WDT Most people will say N. -config W83697HF_WDT - tristate "W83697HF/W83697HG Watchdog Timer" - depends on X86 - ---help--- - This is the driver for the hardware watchdog on the W83697HF/HG - chipset as used in Dedibox/VIA motherboards (and likely others). - This watchdog simply watches your kernel to make sure it doesn't - freeze, and if it does, it reboots your computer after a certain - amount of time. - - To compile this driver as a module, choose M here: the - module will be called w83697hf_wdt. - - Most people will say N. - -config W83697UG_WDT - tristate "W83697UG/W83697UF Watchdog Timer" - depends on X86 - ---help--- - This is the driver for the hardware watchdog on the W83697UG/UF - chipset as used in MSI Fuzzy CX700 VIA motherboards (and likely others). - This watchdog simply watches your kernel to make sure it doesn't - freeze, and if it does, it reboots your computer after a certain - amount of time. - - To compile this driver as a module, choose M here: the - module will be called w83697ug_wdt. - - Most people will say N. - config W83877F_WDT tristate "W83877F (EMACS) Watchdog Timer" depends on X86
drivers/watchdog/Makefile +0 -2
@@ -107,8 +107,6 @@ obj-$(CONFIG_SMSC_SCH311X_WDT) += sch311x_wdt.o obj-$(CONFIG_SMSC37B787_WDT) += smsc37b787_wdt.o obj-$(CONFIG_VIA_WDT) += via_wdt.o obj-$(CONFIG_W83627HF_WDT) += w83627hf_wdt.o -obj-$(CONFIG_W83697HF_WDT) += w83697hf_wdt.o -obj-$(CONFIG_W83697UG_WDT) += w83697ug_wdt.o obj-$(CONFIG_W83877F_WDT) += w83877f_wdt.o obj-$(CONFIG_W83977F_WDT) += w83977f_wdt.o obj-$(CONFIG_MACHZ_WDT) += machzwd.o
drivers/watchdog/w83697hf_wdt.c deleted +0 -460
460 lines not on this page · raw message
drivers/watchdog/w83697ug_wdt.c deleted +0 -397
397 lines not on this page · raw message
Signature · 1 line
1.7.9.7
Re: [PATCH v3 2/2] watchdog: Remove drivers for W83697HF and W83697UG
Hi Guenter,
Quoted 8 lines
Since both chips are now supported by the w83627hf watchdog driver, the chip specific drivers are no longer needed and can be removed.
Signed-off-by Guenter Roeck <[email protected]>---
v3: rebase to latest upstream kernel
v2: resend, no change to v1
Quoted 8 lines
drivers/watchdog/Kconfig | 30 --- drivers/watchdog/Makefile | 2 - drivers/watchdog/w83697hf_wdt.c | 460 --------------------------------------- drivers/watchdog/w83697ug_wdt.c | 397 --------------------------------- 4 files changed, 889 deletions(-) delete mode 100644 drivers/watchdog/w83697hf_wdt.c delete mode 100644 drivers/watchdog/w83697ug_wdt.c
Has been added to linux-watchdog-next.
Kind regards,
Wim.
Guenter Roeck
maintainerRe: [PATCH v3 2/2] watchdog: Remove drivers for W83697HF and W83697UG
Quoted 19 lines · Wim Van Sebroeck
Hi Guenter,
Quoted 8 lines
Since both chips are now supported by the w83627hf watchdog driver, the chip specific drivers are no longer needed and can be removed.
Signed-off-by Guenter Roeck <[email protected]>---
v3: rebase to latest upstream kernel
v2: resend, no change to v1Quoted 8 lines
drivers/watchdog/Kconfig | 30 --- drivers/watchdog/Makefile | 2 - drivers/watchdog/w83697hf_wdt.c | 460 --------------------------------------- drivers/watchdog/w83697ug_wdt.c | 397 --------------------------------- 4 files changed, 889 deletions(-)delete mode 100644
drivers/watchdog/w83697hf_wdt.cdelete mode 100644drivers/watchdog/w83697ug_wdt.c
Quoted 3 lines
Has been added to linux-watchdog-next.
Thanks!
Guenter
Hi Guenter,
Quoted 31 lines
Add
early_disablemodule parameter to match functionality previously available in thew83697hf_wdtdriver.Signed-off-by Guenter Roeck <[email protected]>--- drivers/watchdog/w83627hf_wdt.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)drivers/watchdog/w83627hf_wdt.c +5
-3@@ -64,6 +64,10 @@ MODULE_PARM_DESC(nowayout,"Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); +static int early_disable; +module_param (early_disable, int,0 ); +MODULE_PARM_DESC (early_disable,"Disable watchdog at boot time (default=0)" ); +/* * Kernel methods. */ @@ -208,9 +212,14 @@ static int w83627hf_init(struct watchdog_device *wdog, enum chips chip) t =superio_inb (cr_wdt_timeout);if (t !=0 ) { -pr_info ("Watchdog already running. Resetting timeout to %d sec\n" , - wdog->timeout); -superio_outb (cr_wdt_timeout, wdog->timeout); +if (early_disable) {
drivers/watchdog/w83627hf_wdt.c static int w83627hf_init(struct watchdog_device *wdog, enum chips chip) · line 225
Quoted 10 lines
drivers/watchdog/w83627hf_wdt.c +7
-0+pr_warn ("Stopping previously enabled watchdog until userland kicks in\n" ); +superio_outb (cr_wdt_timeout,0 ); + }else { +pr_info ("Watchdog already running. Resetting timeout to %d sec\n" , + wdog->timeout); +superio_outb (cr_wdt_timeout, wdog->timeout); + } }/* set second mode & disable keyboard turning off watchdog */
Has been added to linux-watchdog-next.
Kind regards,
Wim.