watchdog: add f71862fg support
PATCH v3 3/3 watchdog: add f71862fg support
from: Lutz Ballaschke <[email protected]>
Cleaned up and replaced some magic numbers by constants.
Signed-off-by Lutz Ballaschke <[email protected]>
---
drivers/watchdog/f71808e_wdt.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-)
drivers/watchdog/f71808e_wdt.c +4 -6
@@ -57,8 +57,6 @@#define SIO_F71882_ID 0x0541/* Chipset ID */ #define SIO_F71889_ID 0x0723/* Chipset ID */ -#define F71882FG_REG_START 0x01 -#define F71808FG_REG_WDO_CONF 0xf0#define F71808FG_REG_WDT_CONF 0xf5#define F71808FG_REG_WD_TIME 0xf6
@@ -83,7 +81,7 @@ module_param(force_id, ushort, 0);MODULE_PARM_DESC (force_id,"Override the detected device ID" );static const int max_timeout =WATCHDOG_MAX_TIMEOUT ; -static int timeout =60 ;/* default timeout in seconds */ +static int timeout =WATCHDOG_TIMEOUT ;/* default timeout in seconds */ module_param (timeout, int,0 );MODULE_PARM_DESC (timeout, "Watchdog timeout in seconds. 1<= timeout <="
@@ -352,13 +350,13 @@ static int watchdog_start(void)switch (watchdog.type) {case f71808fg:/* Set pin 21 to GPIO23/WDTRST#, then to WDTRST# */ -superio_clear_bit (watchdog.sioaddr,0x2a ,3 ); -superio_clear_bit (watchdog.sioaddr,0x2b ,3 ); +superio_clear_bit (watchdog.sioaddr,SIO_REG_MFUNCT2 ,3 ); +superio_clear_bit (watchdog.sioaddr,SIO_REG_MFUNCT3 ,3 );break ;case f71882fg:/* Set pin 56 to WDTRST# */ -superio_set_bit (watchdog.sioaddr,0x29 ,1 ); +superio_set_bit (watchdog.sioaddr,SIO_REG_MFUNCT1 ,1 );break ;case f71862fg:
Re: [PATCHv3 3/3] watchdog: f71808e_wdt: Cleaned up and replaced some magic numbers by constants
Quoted 7 lines · Lutz Ballaschke
Cleaned up and replaced some magic numbers by constants.
Signed-off-by Lutz Ballaschke <[email protected]>---
drivers/watchdog/f71808e_wdt.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-)
Signed-off-by Giel van Schijndel <[email protected]>
Signature · 6 lines
Met vriendelijke groet, With kind regards, Giel van Schijndel -- "A clever person solves a problem. A wise person avoids it." -- Albert Einstein