From: Guenter Roeck <linux@roeck-us.net>
To: linux-watchdog@vger.kernel.org
Cc: Wim Van Sebroeck <wim@iguana.be>,
linux-kernel@vger.kernel.org, Guenter Roeck <linux@roeck-us.net>
Subject: [PATCH 6/8] watchdog: w83627hf: Add support for additional chips
Date: Mon, 4 Mar 2013 20:54:17 -0800 [thread overview]
Message-ID: <1362459259-9733-7-git-send-email-linux@roeck-us.net> (raw)
In-Reply-To: <1362459259-9733-1-git-send-email-linux@roeck-us.net>
W83667HG-B, NCT6775, NCT6776 have the same watchdog registers as the
other supported chips but require a slightly different initialization.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
drivers/watchdog/Kconfig | 18 ++++++++++++++----
drivers/watchdog/w83627hf_wdt.c | 29 ++++++++++++++++++++++++++++-
2 files changed, 42 insertions(+), 5 deletions(-)
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index dd462af..346bc70 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -854,13 +854,23 @@ config VIA_WDT
Most people will say N.
config W83627HF_WDT
- tristate "W83627HF/W83627DHG Watchdog Timer"
+ tristate "Watchdog timer for W83627HF/W83627DHG and compatibles"
depends on X86
select WATCHDOG_CORE
---help---
- This is the driver for the hardware watchdog on the W83627HF chipset
- as used in Advantech PC-9578 and Tyan S2721-533 motherboards
- (and likely others). The driver also supports the W83627DHG chip.
+ This is the driver for the hardware watchdog on the following
+ Super I/O chips.
+ W83627DHG
+ W83627HF
+ W83627EHF
+ W83627THF
+ W83627UHG
+ W83637HF
+ W83667HG-B
+ W83687THF
+ NCT6775
+ NCT6776
+
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.
diff --git a/drivers/watchdog/w83627hf_wdt.c b/drivers/watchdog/w83627hf_wdt.c
index 3a2ba30..b23f296 100644
--- a/drivers/watchdog/w83627hf_wdt.c
+++ b/drivers/watchdog/w83627hf_wdt.c
@@ -47,7 +47,7 @@
static int wdt_io;
enum chips { w83627hf, w83637hf, w83627thf, w83687thf, w83627ehf, w83627dhg,
- w83627uhg };
+ w83627uhg, w83667hg_b, nct6775, nct6776 };
/*
* Kernel methods.
@@ -67,6 +67,9 @@ enum chips { w83627hf, w83637hf, w83627thf, w83687thf, w83627ehf, w83627dhg,
#define W83627EHF_ID 0x88
#define W83627DHG_ID 0xa0
#define W83627UHG_ID 0xa2
+#define W83667HG_B_ID 0xb3
+#define NCT6775_ID 0xb4
+#define NCT6776_ID 0xc3
static void superio_outb(int reg, int val)
{
@@ -130,6 +133,18 @@ static void w83627hf_init(enum chips chip)
case w83637hf:
case w83687thf:
break;
+ case w83667hg_b:
+ case nct6775:
+ case nct6776:
+ /*
+ * These chips support more than one WDTO# output pin.
+ * Don't touch it, and hope the BIOS does the right thing.
+ */
+ t = superio_inb(0xF5);
+ t |= 0x02; /* enable the WDTO# output low pulse
+ * to the KBRST# pin */
+ superio_outb(0xF5, t);
+ break;
default:
break;
}
@@ -268,6 +283,15 @@ static int wdt_find(int addr)
case W83627UHG_ID:
ret = w83627uhg;
break;
+ case W83667HG_B_ID:
+ ret = w83667hg_b;
+ break;
+ case NCT6775_ID:
+ ret = nct6775;
+ break;
+ case NCT6776_ID:
+ ret = nct6776;
+ break;
case 0xff:
break;
default:
@@ -291,6 +315,9 @@ static int __init wdt_init(void)
"W83627EHF",
"W83627DHG",
"W83627UHG",
+ "W83667HG-B",
+ "NCT6775",
+ "NCT6776",
};
wdt_io = 0x2e;
--
1.7.9.7
next prev parent reply other threads:[~2013-03-05 4:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-05 4:54 [PATCH 0/8] watchdog: w83627hf: Convert to watchdog infrastructure Guenter Roeck
2013-03-05 4:54 ` [PATCH 1/8] " Guenter Roeck
2013-03-05 4:54 ` Guenter Roeck
2013-03-05 4:54 ` [PATCH 2/8] watchdog: w83627hf: Enable watchdog only once Guenter Roeck
2013-03-05 4:54 ` [PATCH 3/8] watchdog: w83627hf: Enable watchdog device only if not already enabled Guenter Roeck
2013-03-05 4:54 ` [PATCH 4/8] watchdog: w83627hf: Use helper functions to access superio registers Guenter Roeck
2013-03-05 4:54 ` [PATCH 5/8] watchdog: w83627hf: Auto-detect IO address and supported chips Guenter Roeck
2013-03-05 4:54 ` Guenter Roeck [this message]
2013-03-05 4:54 ` [PATCH 7/8] watchdog: w83627hf: Add support for W83697HF and W83697UG Guenter Roeck
2013-03-05 4:54 ` [PATCH 8/8] watchdog: Remove drivers " Guenter Roeck
2013-03-05 4:54 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1362459259-9733-7-git-send-email-linux@roeck-us.net \
--to=linux@roeck-us.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=wim@iguana.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.