Re: Patch for Fintek F71869 watchdoh

From: Michel Arboi
Date: Mon Dec 06 2010 - 15:02:27 EST


On Mon, 6 Dec 2010 20:19:30 +0100
Giel van Schijndel <me@xxxxxxxxx> wrote:

> Please insert that constant in the list of other Chipset ID's
> alphabetically sorted (to keep that list consistent).

Like this?

> The rest of that patch looks fine. So if you perform the above
> modification you'll get my Ack.

Please note that this was just a quick hack. My basic tests showed that
the board did not reboot by itself, and it rebooted when I stopped the
watchdog process.
I downloaded the chip datasheet from Fintek's site but could not make
much sense out of it. It is rather terse.

--- ./drivers/watchdog/f71808e_wdt.c 2010-10-20 22:30:22.000000000 +0200
+++ /tmp/f71808e_wdt.c 2010-12-06 20:48:00.257989527 +0100
@@ -49,6 +49,7 @@
#define SIO_F71808_ID 0x0901 /* Chipset ID */
#define SIO_F71858_ID 0x0507 /* Chipset ID */
#define SIO_F71862_ID 0x0601 /* Chipset ID */
+#define SIO_F71869_ID 0x0814
#define SIO_F71882_ID 0x0541 /* Chipset ID */
#define SIO_F71889_ID 0x0723 /* Chipset ID */

@@ -98,12 +99,13 @@
MODULE_PARM_DESC(start_withtimeout, "Start watchdog timer on module load with"
" given initial timeout. Zero (default) disables this feature.");

-enum chips { f71808fg, f71858fg, f71862fg, f71882fg, f71889fg };
+enum chips { f71808fg, f71858fg, f71862fg, f71869, f71882fg, f71889fg };

static const char *f71808e_names[] = {
"f71808fg",
"f71858fg",
"f71862fg",
+ "f71869",
"f71882fg",
"f71889fg",
};
@@ -308,6 +310,10 @@
superio_set_bit(watchdog.sioaddr, 0x29, 1);
break;

+ case f71869:
+ /* GPIO14 --> WDTRST# */
+ superio_clear_bit(watchdog.sioaddr, 0x29, 4);
+ break;
default:
/*
* 'default' label to shut up the compiler and catch
@@ -708,6 +714,9 @@
case SIO_F71882_ID:
watchdog.type = f71882fg;
break;
+ case SIO_F71869_ID:
+ watchdog.type = f71869;
+ break;
case SIO_F71862_ID:
case SIO_F71889_ID:
/* These have a watchdog, though it isn't implemented (yet). */