watchdog - v2.6.37-rc1
Hi Linus,
Please pull from 'master' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git
or if master.kernel.org hasn't synced up yet:
master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git
This will update the following files:
drivers/watchdog/Kconfig | 23 +- drivers/watchdog/Makefile | 1 drivers/watchdog/bcm63xx_wdt.c | 350 +++++++++++++++++++++++++++++++++++++++++ drivers/watchdog/f71808e_wdt.c | 10 + drivers/watchdog/iTCO_wdt.c | 26 +-- drivers/watchdog/it8712f_wdt.c | 25 +- drivers/watchdog/it87_wdt.c | 96 +++++++---- drivers/watchdog/machzwd.c | 4 8 files changed, 479 insertions(+), 56 deletions(-)
with these Changes:
Author: Prarit Bhargava <[email protected]> Date: Wed Oct 27 09:50:22 2010 -0400
watchdog: iTCO_wdt.c: remove extra pci_dev_put()'s from init code
The iTCO_wdt driver erroneously releases the pci_dev, and causes PCI hotremove to fail because of an incorrect usage count.
The probe for this driver does a for_each_pci_dev() which gets a reference for a pci_dev when iTCO_wdt_init() is successful. The for_each_pci_dev() loop puts a reference for a pci_dev when iTCO_wdt_init() fails, so the iTCO_wdt_init() does not need to do any pci_dev_put()'s.
The only pci_dev_put() that is required is in the iTCO_wdt_cleanup() function.
Author: Florian Fainelli <[email protected]> Date: Sat Aug 28 22:03:45 2010 +0200
watchdog: add support for Broadcom BCM63xx built-in watchdog
This patch adds support for the Broadcom BCM63xx SoC built-in watchdog, it uses one of the BCM63xx hardware timer id.
Author: Giel van Schijndel <[email protected]> Date: Mon Oct 4 10:45:28 2010 +0200
watchdog: f71808e_wdt: add support for the F71889FG
Author: Nicolas Kaiser <[email protected]> Date: Sat Oct 9 14:19:46 2010 +0200
watchdog: MachZ: fix debug macro
Fix debug macro line wrapping.
Author: Timo Juhani Lindfors <[email protected]> Date: Thu Sep 30 17:08:04 2010 +0300
watchdog: it8712f_wdt: Add module parameter for alternative reset sources
On iEi PCISA-9652-R10 (BIOS version 1.5) single board computer reads from the game port do not seem to reset the watchdog timer. This patch adds a module parameter wdt_config_reg to specify alternative reset sources. At least WDT_RESET_KBD has been tested, even just running
while true; do
setleds -L +scroll
sleep 1
setleds -L -scroll
sleep 1
done
is enough to keep the watchdog happy.
Author: Timo Juhani Lindfors <[email protected]> Date: Thu Sep 30 17:08:03 2010 +0300
watchdog: it8712f_wdt: Add comments for config/control register names
Author: Ondrej Zajicek <[email protected]> Date: Tue Sep 14 02:54:16 2010 +0200
watchdog: it87_wdt: Add support for watchdogs with 8b timers
This patch adds support for watchdogs with 8b timers, like ones in IT8702F and older revisions of IT8712F Super IO chip, to it87_wdt driver. This patch should be used after the patch 'it87_wdt: Add support for IT8720F watchdog'.
Author: Ondrej Zajicek <[email protected]> Date: Tue Sep 14 02:47:28 2010 +0200
watchdog: it87_wdt: Add support for IT8720F watchdog
This simple patch adds support for a watchdog in IT8720F Super IO chip to it87_wdt driver.
Author: Joe Perches <[email protected]> Date: Mon Sep 13 21:23:59 2010 -0700
watchdog: Use static const char * const where possible
Author: Prarit Bhargava <[email protected]> Date: Fri Aug 6 11:41:24 2010 -0400
watchdog: iTCO_wdt: Cleanup warning messages
The current iTCO_wdt driver warnings are confusing. Currently when the device driver returns an error the console contains:
iTCO_vendor_support: vendor-support=0
iTCO_wdt: Intel TCO WatchDog Timer Driver v1.05
iTCO_wdt: failed to reset NO_REBOOT flag, reboot disabled by hardware
iTCO_wdt: No card detected
After the patch,
iTCO_vendor_support: vendor-support=0
iTCO_wdt: Intel TCO WatchDog Timer Driver v1.05
iTCO_wdt: failed to reset NO_REBOOT flag, device disabled by hardware/BIOS
Clean this up and use the word "device" to describe the device.
Author: Seth Heasley <[email protected]> Date: Thu Sep 9 09:58:03 2010 -0700
watchdog: iTCO_wdt: TCO Watchdog patch for Intel Patsburg DeviceIDs
This patch adds the Intel Patsburg (PCH) DeviceIDs for iTCO Watchdog.
The Changes can also be looked at on:
http://www.kernel.org/git/?p=linux/kernel/git/wim/linux-2.6-watchdog.git;a=summary
For completeness, I added the overal diff below.
Greetings,
Wim.
================================================================================
drivers/watchdog/Kconfig +17 -6
@@ -409,11 +409,11 @@ config ALIM7101_WDT Most people will say N. config F71808E_WDT - tristate "Fintek F71808E and F71882FG Watchdog" + tristate "Fintek F71808E, F71882FG and F71889FG Watchdog" depends on X86 && EXPERIMENTAL help This is the driver for the hardware watchdog on the Fintek - F71808E and F71882FG Super I/O controllers. + F71808E, F71882FG and F71889FG Super I/O controllers. You can compile this driver directly into the kernel, or use it as a module. The module will be called f71808e_wdt.
@@ -565,10 +565,11 @@ config IT87_WDT tristate "IT87 Watchdog Timer" depends on X86 && EXPERIMENTAL ---help--- - This is the driver for the hardware watchdog on the ITE IT8716, - IT8718, IT8726, IT8712(Version J,K) Super I/O chips. 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. + This is the driver for the hardware watchdog on the ITE IT8702, + IT8712, IT8716, IT8718, IT8720, IT8726, IT8712 Super I/O chips. + 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 it87_wdt.
@@ -916,6 +917,16 @@ config OCTEON_WDT from the first interrupt, it is then only poked when the device is written. +config BCM63XX_WDT + tristate "Broadcom BCM63xx hardware watchdog" + depends on BCM63XX + help + Watchdog driver for the built in watchdog hardware in Broadcom + BCM63xx SoC. + + To compile this driver as a loadable module, choose M here. + The module will be called bcm63xx_wdt. + # PARISC Architecture # POWERPC Architecture
drivers/watchdog/Makefile +1 -0
@@ -109,6 +109,7 @@ obj-$(CONFIG_SBC_EPX_C3_WATCHDOG) += sbc_epx_c3.o # MIPS Architecture obj-$(CONFIG_BCM47XX_WDT) += bcm47xx_wdt.o +obj-$(CONFIG_BCM63XX_WDT) += bcm63xx_wdt.o obj-$(CONFIG_RC32434_WDT) += rc32434_wdt.o obj-$(CONFIG_INDYDOG) += indydog.o obj-$(CONFIG_WDT_MTX1) += mtx-1_wdt.o
drivers/watchdog/bcm63xx_wdt.c new file +350 -0
350 lines not on this page · raw message
drivers/watchdog/f71808e_wdt.c +9 -1
@@ -308,6 +308,12 @@ static int watchdog_start(void)superio_set_bit (watchdog.sioaddr,0x29 ,1 );break ; +case f71889fg: +/* set pin 40 to WDTRST# */ +superio_outb (watchdog.sioaddr,0x2b , +superio_inb (watchdog.sioaddr,0x2b ) &0xcf ); +break ; +default :/* * 'default' label to shut up the compiler and catch
@@ -708,8 +714,10 @@ static int __init f71808e_find(int sioaddr)case SIO_F71882_ID : watchdog.type = f71882fg;break ; -case SIO_F71862_ID :case SIO_F71889_ID : + watchdog.type = f71889fg; +break ; +case SIO_F71862_ID :/* These have a watchdog, though it isn't implemented (yet). */ err = -ENOSYS ; goto exit;
drivers/watchdog/iTCO_wdt.c +15 -11
@@ -146,6 +146,7 @@ enum iTCO_chipsets {TCO_CPT29 ,/* Cougar Point */ TCO_CPT30 ,/* Cougar Point */ TCO_CPT31 ,/* Cougar Point */ + TCO_PBG, /* Patsburg */ }; static struct {
@@ -233,6 +234,7 @@ static struct { {"Cougar Point", 2}, {"Cougar Point", 2}, {"Cougar Point", 2}, + {"Patsburg", 2}, {NULL, 0} };
@@ -348,6 +350,7 @@ static struct pci_device_id iTCO_wdt_pci_tbl[] = { { ITCO_PCI_DEVICE(0x1c5d, TCO_CPT29)}, { ITCO_PCI_DEVICE(0x1c5e, TCO_CPT30)}, { ITCO_PCI_DEVICE(0x1c5f, TCO_CPT31)}, + { ITCO_PCI_DEVICE(0x1d40, TCO_PBG)}, { 0, }, /* End of list */ };MODULE_DEVICE_TABLE (pci, iTCO_wdt_pci_tbl);
@@ -374,7 +377,7 @@ static char expect_release; static struct { /* this is private data for the iTCO_wdt device */ /* TCO version/generation */ unsigned int iTCO_version; - /* The cards ACPIBASE address (TCOBASE = ACPIBASE+0x60) */ + /* The device's ACPIBASE address (TCOBASE = ACPIBASE+0x60) */ unsigned long ACPIBASE; /* NO_REBOOT flag is Memory-Mapped GCS register bit 5 (TCO version 2)*/ unsigned long __iomem *gcs;
@@ -467,7 +470,7 @@ static int iTCO_wdt_start(void)if (iTCO_wdt_unset_NO_REBOOT_bit ()) {spin_unlock (&iTCO_wdt_private.io_lock); printk(KERN_ERR PFX "failed to reset NO_REBOOT flag, " - "reboot disabled by hardware\n"); + "reboot disabled by hardware/BIOS\n");return -EIO ; }
@@ -781,8 +784,8 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev, base_address &=0x0000ff80 ;if (base_address ==0x00000000 ) {/* Something's wrong here, ACPIBASE has to be set */ - printk(KERN_ERR PFX "failed to get TCOBASE address\n"); -pci_dev_put (pdev); + printk(KERN_ERR PFX "failed to get TCOBASE address, " + "device disabled by hardware/BIOS\n");return -ENODEV ; } iTCO_wdt_private.iTCO_version =
@@ -797,7 +800,8 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev,if (iTCO_wdt_private.iTCO_version ==2 ) {pci_read_config_dword (pdev,0xf0 , &base_address);if ((base_address &1 ) ==0 ) { - printk(KERN_ERR PFX "RCBA is disabled by hardware\n"); + printk(KERN_ERR PFX "RCBA is disabled by hardware" + "/BIOS, device disabled\n"); ret = -ENODEV ; goto out; }
@@ -808,7 +812,7 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev,/* Check chipset's NO_REBOOT bit */ if (iTCO_wdt_unset_NO_REBOOT_bit () &&iTCO_vendor_check_noreboot_on ()) { printk(KERN_INFO PFX "unable to reset NO_REBOOT flag, " - "platform may have disabled it\n"); + "device disabled by hardware/BIOS\n"); ret = -ENODEV ;/* Cannot reset NO_REBOOT bit */ goto out_unmap; }
@@ -819,7 +823,8 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev,/* The TCO logic uses the TCO_EN bit in the SMI_EN register */ if (!request_region (SMI_EN ,4 ,"iTCO_wdt" )) { printk(KERN_ERR PFX - "I/O address 0x%04lx already in use\n", SMI_EN); +"I/O address 0x%04lx already in use, " + "device disabled\n", SMI_EN); ret = -EIO ; goto out_unmap; }
@@ -831,8 +836,8 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev,/* The TCO I/O registers reside in a 32-byte range pointed to by the TCOBASE value */ if (!request_region (TCOBASE ,0x20 ,"iTCO_wdt" )) { - printk(KERN_ERR PFX "I/O address 0x%04lx already in use\n", - TCOBASE); + printk(KERN_ERR PFX "I/O address 0x%04lx already in use " + "device disabled\n", TCOBASE); ret = -EIO ; goto unreg_smi_en; }
@@ -880,7 +885,6 @@ out_unmap:if (iTCO_wdt_private.iTCO_version ==2 )iounmap (iTCO_wdt_private.gcs); out: -pci_dev_put (iTCO_wdt_private.pdev); iTCO_wdt_private.ACPIBASE =0 ;return ret; }
@@ -921,7 +925,7 @@ static int __devinit iTCO_wdt_probe(struct platform_device *dev) }if (!found) - printk(KERN_INFO PFX "No card detected\n"); + printk(KERN_INFO PFX "No device detected.\n");return ret; }
drivers/watchdog/it8712f_wdt.c +17 -8
@@ -75,15 +75,23 @@ static unsigned short address;#define WDT_CONFIG 0x72/* WDT Register: Configuration */ #define WDT_TIMEOUT 0x73/* WDT Register: Timeout Value */ -#define WDT_RESET_GAME 0x10 -#define WDT_RESET_KBD 0x20 -#define WDT_RESET_MOUSE 0x40 -#define WDT_RESET_CIR 0x80 +#define WDT_RESET_GAME 0x10/* Reset timer on read or write to game port */ +#define WDT_RESET_KBD 0x20/* Reset timer on keyboard interrupt */ +#define WDT_RESET_MOUSE 0x40/* Reset timer on mouse interrupt */ +#define WDT_RESET_CIR 0x80/* Reset timer on consumer IR interrupt */ #define WDT_UNIT_SEC 0x80/* If 0 in MINUTES */ -#define WDT_OUT_PWROK 0x10 -#define WDT_OUT_KRST 0x40 +#define WDT_OUT_PWROK 0x10/* Pulse PWROK on timeout */ +#define WDT_OUT_KRST 0x40/* Pulse reset on timeout */ + +static int wdt_control_reg =WDT_RESET_GAME ; +module_param (wdt_control_reg, int,0 ); +MODULE_PARM_DESC (wdt_control_reg,"Value to write to watchdog control " +"register. The default WDT_RESET_GAME resets the timer on " +"game port reads that this driver generates. You can also " +"use KBD, MOUSE or CIR if you have some external way to " +"generate those interrupts." );static int superio_inb (int reg) {
@@ -131,7 +139,8 @@ static inline void superio_exit(void)static inline void it8712f_wdt_ping (void ) { -inb (address); +if (wdt_control_reg &WDT_RESET_GAME ) +inb (address); }static void it8712f_wdt_update_margin (void )
@@ -170,7 +179,7 @@ static void it8712f_wdt_enable(void)superio_enter ();superio_select (LDN_GPIO ); -superio_outb (WDT_RESET_GAME ,WDT_CONTROL ); +superio_outb (wdt_control_reg,WDT_CONTROL );it8712f_wdt_update_margin ();
drivers/watchdog/it87_wdt.c +68 -28
224 lines not on this page · raw message
drivers/watchdog/machzwd.c +2 -2
@@ -143,7 +143,7 @@ static unsigned long next_heartbeat;#ifndef ZF_DEBUG # define dprintk(format, args...)#else -# define dprintk(format, args...) printk(KERN_DEBUG PFX +# define dprintk(format, args...) printk(KERN_DEBUG PFX \ ":%s:%d: " format, __func__, __LINE__ , ## args)#endif
@@ -388,7 +388,7 @@ static struct notifier_block zf_notifier = {static void __init zf_show_action (int act) { -char *str[] = {"RESET" ,"SMI" ,"NMI" ,"SCI" }; +static const char *const str[] = {"RESET" ,"SMI" ,"NMI" ,"SCI" }; printk(KERN_INFO PFX ": Watchdog using action = %s\n", str[act]); }