Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b87da68 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull first set of watchdog updates from Wim Van Sebroeck:
 "This pull contains:

   - The removal of ixp2000_wdt
   - The addition of ie6xx_wdt
   - Some documentation fixes
   - Small fixes and improvements

  (Note: Part 2 will contain generic watchdog core changes + conversion
  of some more drivers)"

* git://www.linux-watchdog.org/linux-watchdog:
  Documentation/watchdog: Fix the file descriptor leak when no cmdline arg given
  Documentation/watchdog: close the fd when cmdline arg given
  Documentation/watchdog: Fix a small typo
  watchdog: s3c2410_wdt: Set timeout to actually achieved timeout
  watchdog: wm831x: Convert to gpio_request_one()
  watchdog: via_wdt: depends on PCI
  watchdog: ie6xx_wdt needs io.h
  watchdog: ie6xx_wdt.c: fix printk format warning
  watchdog: Add watchdog driver for Intel Atom E6XX
  watchdog: it87_wdt: Add support for IT8728F watchdog.
  watchdog: i6300esb: don't depend on X86
  watchdog: Use module_pci_driver
  watchdog: sch311x_wdt.c: Remove RESGEN
  watchdog: s3c2410-wdt: Use of_match_ptr().
  watchdog: Device tree support for pnx4008-wdt
  watchdog: ar7_wdt.c: use devm_request_and_ioremap
  watchdog: remove ixp2000 driver
  watchdog: sp5100_tco.c: quiet sparse noise about using plain integer was NULL pointer
parents 59d0952b cad19fa6
Loading
Loading
Loading
Loading
+13 −0
Original line number Original line Diff line number Diff line
* NXP PNX watchdog timer

Required properties:
- compatible: must be "nxp,pnx4008-wdt"
- reg: physical base address of the controller and length of memory mapped
  region.

Example:

	watchdog@4003C000 {
		compatible = "nxp,pnx4008-wdt";
		reg = <0x4003C000 0x1000>;
	};
+17 −3
Original line number Original line Diff line number Diff line
@@ -7,6 +7,7 @@
#include <string.h>
#include <string.h>
#include <unistd.h>
#include <unistd.h>
#include <fcntl.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/ioctl.h>
#include <sys/ioctl.h>
#include <linux/types.h>
#include <linux/types.h>
#include <linux/watchdog.h>
#include <linux/watchdog.h>
@@ -29,6 +30,14 @@ static void keep_alive(void)
 * The main program.  Run the program with "-d" to disable the card,
 * The main program.  Run the program with "-d" to disable the card,
 * or "-e" to enable the card.
 * or "-e" to enable the card.
 */
 */

void term(int sig)
{
    close(fd);
    fprintf(stderr, "Stopping watchdog ticks...\n");
    exit(0);
}

int main(int argc, char *argv[])
int main(int argc, char *argv[])
{
{
    int flags;
    int flags;
@@ -47,26 +56,31 @@ int main(int argc, char *argv[])
	    ioctl(fd, WDIOC_SETOPTIONS, &flags);
	    ioctl(fd, WDIOC_SETOPTIONS, &flags);
	    fprintf(stderr, "Watchdog card disabled.\n");
	    fprintf(stderr, "Watchdog card disabled.\n");
	    fflush(stderr);
	    fflush(stderr);
	    exit(0);
	    goto end;
	} else if (!strncasecmp(argv[1], "-e", 2)) {
	} else if (!strncasecmp(argv[1], "-e", 2)) {
	    flags = WDIOS_ENABLECARD;
	    flags = WDIOS_ENABLECARD;
	    ioctl(fd, WDIOC_SETOPTIONS, &flags);
	    ioctl(fd, WDIOC_SETOPTIONS, &flags);
	    fprintf(stderr, "Watchdog card enabled.\n");
	    fprintf(stderr, "Watchdog card enabled.\n");
	    fflush(stderr);
	    fflush(stderr);
	    exit(0);
	    goto end;
	} else {
	} else {
	    fprintf(stderr, "-d to disable, -e to enable.\n");
	    fprintf(stderr, "-d to disable, -e to enable.\n");
	    fprintf(stderr, "run by itself to tick the card.\n");
	    fprintf(stderr, "run by itself to tick the card.\n");
	    fflush(stderr);
	    fflush(stderr);
	    exit(0);
	    goto end;
	}
	}
    } else {
    } else {
	fprintf(stderr, "Watchdog Ticking Away!\n");
	fprintf(stderr, "Watchdog Ticking Away!\n");
	fflush(stderr);
	fflush(stderr);
    }
    }


    signal(SIGINT, term);

    while(1) {
    while(1) {
	keep_alive();
	keep_alive();
	sleep(1);
	sleep(1);
    }
    }
end:
    close(fd);
    return 0;
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -59,7 +59,7 @@ It contains following fields:
* bootstatus: status of the device after booting (reported with watchdog
* bootstatus: status of the device after booting (reported with watchdog
  WDIOF_* status bits).
  WDIOF_* status bits).
* driver_data: a pointer to the drivers private data of a watchdog device.
* driver_data: a pointer to the drivers private data of a watchdog device.
  This data should only be accessed via the watchdog_set_drvadata and
  This data should only be accessed via the watchdog_set_drvdata and
  watchdog_get_drvdata routines.
  watchdog_get_drvdata routines.
* status: this field contains a number of status bits that give extra
* status: this field contains a number of status bits that give extra
  information about the status of the device (Like: is the watchdog timer
  information about the status of the device (Like: is the watchdog timer
+21 −14
Original line number Original line Diff line number Diff line
@@ -129,17 +129,6 @@ config 977_WATCHDOG


	  Not sure? It's safe to say N.
	  Not sure? It's safe to say N.


config IXP2000_WATCHDOG
	tristate "IXP2000 Watchdog"
	depends on ARCH_IXP2000
	help
	  Say Y here if to include support for the watchdog timer
	  in the Intel IXP2000(2400, 2800, 2850) network processors.
	  This driver can be built as a module by choosing M. The module
	  will be called ixp2000_wdt.

	  Say N if you are unsure.

config IXP4XX_WATCHDOG
config IXP4XX_WATCHDOG
	tristate "IXP4xx Watchdog"
	tristate "IXP4xx Watchdog"
	depends on ARCH_IXP4XX
	depends on ARCH_IXP4XX
@@ -543,7 +532,7 @@ config WAFER_WDT


config I6300ESB_WDT
config I6300ESB_WDT
	tristate "Intel 6300ESB Timer/Watchdog"
	tristate "Intel 6300ESB Timer/Watchdog"
	depends on X86 && PCI
	depends on PCI
	---help---
	---help---
	  Hardware driver for the watchdog timer built into the Intel
	  Hardware driver for the watchdog timer built into the Intel
	  6300ESB controller hub.
	  6300ESB controller hub.
@@ -551,6 +540,19 @@ config I6300ESB_WDT
	  To compile this driver as a module, choose M here: the
	  To compile this driver as a module, choose M here: the
	  module will be called i6300esb.
	  module will be called i6300esb.


config IE6XX_WDT
	tristate "Intel Atom E6xx Watchdog"
	depends on X86 && PCI
	select WATCHDOG_CORE
	select MFD_CORE
	select LPC_SCH
	---help---
	  Hardware driver for the watchdog timer built into the Intel
	  Atom E6XX (TunnelCreek) processor.

	  To compile this driver as a module, choose M here: the
	  module will be called ie6xx_wdt.

config INTEL_SCU_WATCHDOG
config INTEL_SCU_WATCHDOG
	bool "Intel SCU Watchdog for Mobile Platforms"
	bool "Intel SCU Watchdog for Mobile Platforms"
	depends on X86_MRST
	depends on X86_MRST
@@ -607,7 +609,12 @@ config IT87_WDT
	depends on X86 && EXPERIMENTAL
	depends on X86 && EXPERIMENTAL
	---help---
	---help---
	  This is the driver for the hardware watchdog on the ITE IT8702,
	  This is the driver for the hardware watchdog on the ITE IT8702,
	  IT8712, IT8716, IT8718, IT8720, IT8721, IT8726 Super I/O chips.
	  IT8712, IT8716, IT8718, IT8720, IT8721, IT8726 and IT8728
	  Super I/O chips.

	  If the driver does not work, then make sure that the game port in
	  the BIOS is enabled.

	  This watchdog simply watches your kernel to make sure it doesn't
	  This watchdog simply watches your kernel to make sure it doesn't
	  freeze, and if it does, it reboots your computer after a certain
	  freeze, and if it does, it reboots your computer after a certain
	  amount of time.
	  amount of time.
@@ -780,7 +787,7 @@ config SMSC37B787_WDT


config VIA_WDT
config VIA_WDT
	tristate "VIA Watchdog Timer"
	tristate "VIA Watchdog Timer"
	depends on X86
	depends on X86 && PCI
	select WATCHDOG_CORE
	select WATCHDOG_CORE
	---help---
	---help---
	This is the driver for the hardware watchdog timer on VIA
	This is the driver for the hardware watchdog timer on VIA
+1 −1
Original line number Original line Diff line number Diff line
@@ -36,7 +36,6 @@ obj-$(CONFIG_OMAP_WATCHDOG) += omap_wdt.o
obj-$(CONFIG_TWL4030_WATCHDOG) += twl4030_wdt.o
obj-$(CONFIG_TWL4030_WATCHDOG) += twl4030_wdt.o
obj-$(CONFIG_21285_WATCHDOG) += wdt285.o
obj-$(CONFIG_21285_WATCHDOG) += wdt285.o
obj-$(CONFIG_977_WATCHDOG) += wdt977.o
obj-$(CONFIG_977_WATCHDOG) += wdt977.o
obj-$(CONFIG_IXP2000_WATCHDOG) += ixp2000_wdt.o
obj-$(CONFIG_IXP4XX_WATCHDOG) += ixp4xx_wdt.o
obj-$(CONFIG_IXP4XX_WATCHDOG) += ixp4xx_wdt.o
obj-$(CONFIG_KS8695_WATCHDOG) += ks8695_wdt.o
obj-$(CONFIG_KS8695_WATCHDOG) += ks8695_wdt.o
obj-$(CONFIG_S3C2410_WATCHDOG) += s3c2410_wdt.o
obj-$(CONFIG_S3C2410_WATCHDOG) += s3c2410_wdt.o
@@ -81,6 +80,7 @@ obj-$(CONFIG_IB700_WDT) += ib700wdt.o
obj-$(CONFIG_IBMASR) += ibmasr.o
obj-$(CONFIG_IBMASR) += ibmasr.o
obj-$(CONFIG_WAFER_WDT) += wafer5823wdt.o
obj-$(CONFIG_WAFER_WDT) += wafer5823wdt.o
obj-$(CONFIG_I6300ESB_WDT) += i6300esb.o
obj-$(CONFIG_I6300ESB_WDT) += i6300esb.o
obj-$(CONFIG_IE6XX_WDT) += ie6xx_wdt.o
obj-$(CONFIG_ITCO_WDT) += iTCO_wdt.o
obj-$(CONFIG_ITCO_WDT) += iTCO_wdt.o
ifeq ($(CONFIG_ITCO_VENDOR_SUPPORT),y)
ifeq ($(CONFIG_ITCO_VENDOR_SUPPORT),y)
obj-$(CONFIG_ITCO_WDT) += iTCO_vendor_support.o
obj-$(CONFIG_ITCO_WDT) += iTCO_vendor_support.o
Loading