* [PATCHv3 3/3] watchdog: add f71862fg support
@ 2010-09-26 14:38 Lutz Ballaschke
2010-09-26 15:17 ` [PATCHv3 3/3] watchdog: f71808e_wdt: Cleaned up and replaced some magic numbers by constants Giel van Schijndel
0 siblings, 1 reply; 2+ messages in thread
From: Lutz Ballaschke @ 2010-09-26 14:38 UTC (permalink / raw)
To: Giel van Schijndel; +Cc: wim, linux-watchdog, linux-kernel
from: Lutz Ballaschke <vegan.grindcore@googlemail.com>
Cleaned up and replaced some magic numbers by constants.
Signed-off-by: Lutz Ballaschke <vegan.grindcore@googlemail.com>
---
drivers/watchdog/f71808e_wdt.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/watchdog/f71808e_wdt.c b/drivers/watchdog/f71808e_wdt.c
index d070086..c7b9ba7 100644
--- a/drivers/watchdog/f71808e_wdt.c
+++ b/drivers/watchdog/f71808e_wdt.c
@@ -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:
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCHv3 3/3] watchdog: f71808e_wdt: Cleaned up and replaced some magic numbers by constants
2010-09-26 14:38 [PATCHv3 3/3] watchdog: add f71862fg support Lutz Ballaschke
@ 2010-09-26 15:17 ` Giel van Schijndel
0 siblings, 0 replies; 2+ messages in thread
From: Giel van Schijndel @ 2010-09-26 15:17 UTC (permalink / raw)
To: Lutz Ballaschke; +Cc: Wim van Sebroeck, linux-watchdog, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 526 bytes --]
On Sun, Sep 26, 2010 at 04:38:20PM +0200, Lutz Ballaschke wrote:
> Cleaned up and replaced some magic numbers by constants.
>
> Signed-off-by: Lutz Ballaschke <vegan.grindcore@googlemail.com>
> ---
>
> drivers/watchdog/f71808e_wdt.c | 10 ++++------
> 1 files changed, 4 insertions(+), 6 deletions(-)
Signed-off-by: Giel van Schijndel <me@mortis.eu>
--
Met vriendelijke groet,
With kind regards,
Giel van Schijndel
--
"A clever person solves a problem. A wise person avoids it."
-- Albert Einstein
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-26 15:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-26 14:38 [PATCHv3 3/3] watchdog: add f71862fg support Lutz Ballaschke
2010-09-26 15:17 ` [PATCHv3 3/3] watchdog: f71808e_wdt: Cleaned up and replaced some magic numbers by constants Giel van Schijndel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).