Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Pull watchdog updates from Wim Van Sebroeck:
 "This contains:

   - new driver for ST's LPC Watchdog
   - new driver for Conexant Digicolor CX92755 SoC
   - new driver for DA9062 watchdog
   - Addition of the watchdog registration deferral mechanism
   - several improvements on omap_wdt
   - several improvements and reboot-support for imgpdc_wdt
   - max63xx_wdt improvements
   - imx2_wdt improvements
   - dw_wdt improvements
   - and other small improvements and fixes"

* git://www.linux-watchdog.org/linux-watchdog: (37 commits)
  watchdog: omap_wdt: early_enable module parameter
  watchdog: gpio_wdt: Add option for early registration
  watchdog: watchdog_core: Add watchdog registration deferral mechanism
  watchdog: max63xx: dynamically allocate device
  watchdog: imx2_wdt: Disable previously acquired clock on error path
  watchdog: imx2_wdt: Check for clk_prepare_enable() error
  watchdog: hpwdt: Add support for WDIOC_SETOPTIONS
  watchdog: docs: omap_wdt also understands nowayout
  watchdog: omap_wdt: implement get_timeleft
  watchdog: da9062: DA9062 watchdog driver
  watchdog: imx2_wdt: set watchdog parent device
  watchdog: mena21_wdt: Fix possible NULL pointer dereference
  watchdog: dw_wdt: keepalive the watchdog at write time
  watchdog: dw_wdt: No need for a spinlock
  watchdog: imx2_wdt: also set wdog->timeout to new_timeout
  watchdog: Allow compile test of GPIO consumers if !GPIOLIB
  watchdog: cadence: Add dependency on HAS_IOMEM
  watchdog: max63xx_wdt: Constify platform_device_id
  watchdog: MAX63XX_WATCHDOG does not depend on ARM
  watchdog: imgpdc: Add some documentation about the timeout
  ...
  • Loading branch information
Linus Torvalds committed Jul 2, 2015
2 parents 5f1201d + b2102eb commit 93899e3
Show file tree
Hide file tree
Showing 21 changed files with 913 additions and 159 deletions.
25 changes: 25 additions & 0 deletions Documentation/devicetree/bindings/watchdog/digicolor-wdt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Conexant Digicolor SoCs Watchdog timer

The watchdog functionality in Conexant Digicolor SoCs relies on the so called
"Agent Communication" block. This block includes the eight programmable system
timer counters. The first timer (called "Timer A") is the only one that can be
used as watchdog.

Required properties:

- compatible : Should be "cnxt,cx92755-wdt"
- reg : Specifies base physical address and size of the registers
- clocks : phandle; specifies the clock that drives the timer

Optional properties:

- timeout-sec : Contains the watchdog timeout in seconds

Example:

watchdog@f0000fc0 {
compatible = "cnxt,cx92755-wdt";
reg = <0xf0000fc0 0x8>;
clocks = <&main_clk>;
timeout-sec = <15>;
};
9 changes: 5 additions & 4 deletions Documentation/devicetree/bindings/watchdog/omap-wdt.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
TI Watchdog Timer (WDT) Controller for OMAP

Required properties:
compatible:
- "ti,omap3-wdt" for OMAP3
- "ti,omap4-wdt" for OMAP4
- ti,hwmods: Name of the hwmod associated to the WDT
- compatible : "ti,omap3-wdt" for OMAP3 or "ti,omap4-wdt" for OMAP4
- ti,hwmods : Name of the hwmod associated to the WDT

Optional properties:
- timeout-sec : default watchdog timeout in seconds

Examples:

Expand Down
7 changes: 7 additions & 0 deletions Documentation/watchdog/watchdog-kernel-api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ The watchdog_unregister_device routine deregisters a registered watchdog timer
device. The parameter of this routine is the pointer to the registered
watchdog_device structure.

The watchdog subsystem includes an registration deferral mechanism,
which allows you to register an watchdog as early as you wish during
the boot process.

The watchdog device structure looks like this:

struct watchdog_device {
Expand All @@ -52,6 +56,7 @@ struct watchdog_device {
void *driver_data;
struct mutex lock;
unsigned long status;
struct list_head deferred;
};

It contains following fields:
Expand Down Expand Up @@ -80,6 +85,8 @@ It contains following fields:
information about the status of the device (Like: is the watchdog timer
running/active, is the nowayout bit set, is the device opened via
the /dev/watchdog interface or not, ...).
* deferred: entry in wtd_deferred_reg_list which is used to
register early initialized watchdogs.

The list of watchdog operations is defined as:

Expand Down
3 changes: 3 additions & 0 deletions Documentation/watchdog/watchdog-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ nowayout: Watchdog cannot be stopped once started
-------------------------------------------------
omap_wdt:
timer_margin: initial watchdog timeout (in seconds)
early_enable: Watchdog is started on module insertion (default=0
nowayout: Watchdog cannot be stopped once started
(default=kernel config parameter)
-------------------------------------------------
orion_wdt:
heartbeat: Initial watchdog heartbeat in seconds
Expand Down
36 changes: 34 additions & 2 deletions drivers/watchdog/Kconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

#
# Watchdog device configuration
#
Expand Down Expand Up @@ -96,6 +97,15 @@ config DA9063_WATCHDOG

This driver can be built as a module. The module name is da9063_wdt.

config DA9062_WATCHDOG
tristate "Dialog DA9062 Watchdog"
depends on MFD_DA9062
select WATCHDOG_CORE
help
Support for the watchdog in the DA9062 PMIC.

This driver can be built as a module. The module name is da9062_wdt.

config GPIO_WATCHDOG
tristate "Watchdog device controlled through GPIO-line"
depends on OF_GPIO
Expand All @@ -104,6 +114,17 @@ config GPIO_WATCHDOG
If you say yes here you get support for watchdog device
controlled through GPIO-line.

config GPIO_WATCHDOG_ARCH_INITCALL
bool "Register the watchdog as early as possible"
depends on GPIO_WATCHDOG=y
help
In some situations, the default initcall level (module_init)
in not early enough in the boot process to avoid the watchdog
to be triggered.
If you say yes here, the initcall level would be raised to
arch_initcall.
If in doubt, say N.

config MENF21BMC_WATCHDOG
tristate "MEN 14F021P00 BMC Watchdog"
depends on MFD_MENF21BMC
Expand Down Expand Up @@ -169,6 +190,7 @@ config AT91SAM9X_WATCHDOG

config CADENCE_WATCHDOG
tristate "Cadence Watchdog Timer"
depends on HAS_IOMEM
select WATCHDOG_CORE
help
Say Y here if you want to include support for the watchdog
Expand Down Expand Up @@ -408,7 +430,7 @@ config TS72XX_WATCHDOG

config MAX63XX_WATCHDOG
tristate "Max63xx watchdog"
depends on ARM && HAS_IOMEM
depends on HAS_IOMEM
select WATCHDOG_CORE
help
Support for memory mapped max63{69,70,71,72,73,74} watchdog timer.
Expand Down Expand Up @@ -526,6 +548,16 @@ config MEDIATEK_WATCHDOG
To compile this driver as a module, choose M here: the
module will be called mtk_wdt.

config DIGICOLOR_WATCHDOG
tristate "Conexant Digicolor SoCs watchdog support"
depends on ARCH_DIGICOLOR
select WATCHDOG_CORE
help
Say Y here to include support for the watchdog timer
in Conexant Digicolor SoCs.
To compile this driver as a module, choose M here: the
module will be called digicolor_wdt.

# AVR32 Architecture

config AT32AP700X_WDT
Expand Down Expand Up @@ -1355,7 +1387,7 @@ config BOOKE_WDT_DEFAULT_TIMEOUT
config MEN_A21_WDT
tristate "MEN A21 VME CPU Carrier Board Watchdog Timer"
select WATCHDOG_CORE
depends on GPIOLIB
depends on GPIOLIB || COMPILE_TEST
help
Watchdog driver for MEN A21 VMEbus CPU Carrier Boards.

Expand Down
2 changes: 2 additions & 0 deletions drivers/watchdog/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ obj-$(CONFIG_BCM_KONA_WDT) += bcm_kona_wdt.o
obj-$(CONFIG_TEGRA_WATCHDOG) += tegra_wdt.o
obj-$(CONFIG_MESON_WATCHDOG) += meson_wdt.o
obj-$(CONFIG_MEDIATEK_WATCHDOG) += mtk_wdt.o
obj-$(CONFIG_DIGICOLOR_WATCHDOG) += digicolor_wdt.o

# AVR32 Architecture
obj-$(CONFIG_AT32AP700X_WDT) += at32ap700x_wdt.o
Expand Down Expand Up @@ -180,6 +181,7 @@ obj-$(CONFIG_XEN_WDT) += xen_wdt.o
# Architecture Independent
obj-$(CONFIG_DA9052_WATCHDOG) += da9052_wdt.o
obj-$(CONFIG_DA9055_WATCHDOG) += da9055_wdt.o
obj-$(CONFIG_DA9062_WATCHDOG) += da9062_wdt.o
obj-$(CONFIG_DA9063_WATCHDOG) += da9063_wdt.o
obj-$(CONFIG_GPIO_WATCHDOG) += gpio_wdt.o
obj-$(CONFIG_WM831X_WATCHDOG) += wm831x_wdt.o
Expand Down
4 changes: 2 additions & 2 deletions drivers/watchdog/at91sam9_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
#define DRV_NAME "AT91SAM9 Watchdog"

#define wdt_read(wdt, field) \
__raw_readl((wdt)->base + (field))
readl_relaxed((wdt)->base + (field))
#define wdt_write(wtd, field, val) \
__raw_writel((val), (wdt)->base + (field))
writel_relaxed((val), (wdt)->base + (field))

/* AT91SAM9 watchdog runs a 12bit counter @ 256Hz,
* use this to convert a watchdog
Expand Down
Loading

0 comments on commit 93899e3

Please sign in to comment.