Commit 55472bae authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'linux-watchdog-5.2-rc1' of git://www.linux-watchdog.org/linux-watchdog

Pull watchdog updates from Wim Van Sebroeck:

 - a new watchdog driver for the ROHM BD70528 watchdog block

 - a new watchdog driver for the i.MX system controller watchdog

 - conversions to use device managed functions and other improvements

 - refactor watchdog_init_timeout

 - make watchdog core configurable as module

 - pretimeout governors improvements

 - a lot of other fixes

* tag 'linux-watchdog-5.2-rc1' of git://www.linux-watchdog.org/linux-watchdog: (114 commits)
  watchdog: Enforce that at least one pretimeout governor is enabled
  watchdog: stm32: add dynamic prescaler support
  watchdog: Improve Kconfig entry ordering and dependencies
  watchdog: npcm: Enable modular builds
  watchdog: Make watchdog core configurable as module
  watchdog: Move pretimeout governor configuration up
  watchdog: Use depends instead of select for pretimeout governors
  watchdog: rtd119x: drop unused module.h include
  watchdog: intel_scu: make it explicitly non-modular
  watchdog: coh901327: make it explicitly non-modular
  watchdog: ziirave_wdt: drop warning after calling watchdog_init_timeout
  watchdog: xen_wdt: drop warning after calling watchdog_init_timeout
  watchdog: stm32_iwdg: drop warning after calling watchdog_init_timeout
  watchdog: st_lpc_wdt: drop warning after calling watchdog_init_timeout
  watchdog: sp5100_tco: drop warning after calling watchdog_init_timeout
  watchdog: renesas_wdt: drop warning after calling watchdog_init_timeout
  watchdog: nic7018_wdt: drop warning after calling watchdog_init_timeout
  watchdog: ni903x_wdt: drop warning after calling watchdog_init_timeout
  watchdog: imx_sc_wdt: drop warning after calling watchdog_init_timeout
  watchdog: i6300esb: drop warning after calling watchdog_init_timeout
  ...
parents d7a02fa0 a9f0bda5
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
* Freescale i.MX System Controller Watchdog

i.MX system controller watchdog is for i.MX SoCs with system controller inside,
the watchdog is managed by system controller, users can ONLY communicate with
system controller from secure mode for watchdog operations, so Linux i.MX system
controller watchdog driver will call ARM SMC API and trap into ARM-Trusted-Firmware
for watchdog operations, ARM-Trusted-Firmware is running at secure EL3 mode and
it will request system controller to execute the watchdog operation passed from
Linux kernel.

Required properties:
- compatible:	Should be :
		"fsl,imx8qxp-sc-wdt"
		followed by "fsl,imx-sc-wdt";

Optional properties:
- timeout-sec : Contains the watchdog timeout in seconds.

Examples:

watchdog {
	compatible = "fsl,imx8qxp-sc-wdt", "fsl,imx-sc-wdt";
	timeout-sec = <60>;
};
+1 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ Required properties:
	"mediatek,mt7622-wdt", "mediatek,mt6589-wdt": for MT7622
	"mediatek,mt7623-wdt", "mediatek,mt6589-wdt": for MT7623
	"mediatek,mt7629-wdt", "mediatek,mt6589-wdt": for MT7629
	"mediatek,mt8516-wdt", "mediatek,mt6589-wdt": for MT8516

- reg : Specifies base physical address and size of the registers.

+100 −61
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ menuconfig WATCHDOG
if WATCHDOG

config WATCHDOG_CORE
	bool "WatchDog Timer Driver Core"
	tristate "WatchDog Timer Driver Core"
	---help---
	  Say Y here if you want to use the new watchdog timer driver core.
	  This driver provides a framework for all watchdog timer drivers
@@ -63,6 +63,66 @@ config WATCHDOG_SYSFS
	  Say Y here if you want to enable watchdog device status read through
	  sysfs attributes.

comment "Watchdog Pretimeout Governors"

config WATCHDOG_PRETIMEOUT_GOV
	bool "Enable watchdog pretimeout governors"
	depends on WATCHDOG_CORE
	help
	  The option allows to select watchdog pretimeout governors.

config WATCHDOG_PRETIMEOUT_GOV_SEL
	tristate
	depends on WATCHDOG_PRETIMEOUT_GOV
	default m
	select WATCHDOG_PRETIMEOUT_GOV_PANIC if WATCHDOG_PRETIMEOUT_GOV_NOOP=n

if WATCHDOG_PRETIMEOUT_GOV

config WATCHDOG_PRETIMEOUT_GOV_NOOP
	tristate "Noop watchdog pretimeout governor"
	depends on WATCHDOG_CORE
	default WATCHDOG_CORE
	help
	  Noop watchdog pretimeout governor, only an informational
	  message is added to kernel log buffer.

config WATCHDOG_PRETIMEOUT_GOV_PANIC
	tristate "Panic watchdog pretimeout governor"
	depends on WATCHDOG_CORE
	default WATCHDOG_CORE
	help
	  Panic watchdog pretimeout governor, on watchdog pretimeout
	  event put the kernel into panic.

choice
	prompt "Default Watchdog Pretimeout Governor"
	default WATCHDOG_PRETIMEOUT_DEFAULT_GOV_PANIC
	help
	  This option selects a default watchdog pretimeout governor.
	  The governor takes its action, if a watchdog is capable
	  to report a pretimeout event.

config WATCHDOG_PRETIMEOUT_DEFAULT_GOV_NOOP
	bool "noop"
	depends on WATCHDOG_PRETIMEOUT_GOV_NOOP
	help
	  Use noop watchdog pretimeout governor by default. If noop
	  governor is selected by a user, write a short message to
	  the kernel log buffer and don't do any system changes.

config WATCHDOG_PRETIMEOUT_DEFAULT_GOV_PANIC
	bool "panic"
	depends on WATCHDOG_PRETIMEOUT_GOV_PANIC
	help
	  Use panic watchdog pretimeout governor by default, if
	  a watchdog pretimeout event happens, consider that
	  a watchdog feeder is dead and reboot is unavoidable.

endchoice

endif # WATCHDOG_PRETIMEOUT_GOV

#
# General Watchdog drivers
#
@@ -90,6 +150,18 @@ config SOFT_WATCHDOG_PRETIMEOUT
	  watchdog. Be aware that governors might affect the watchdog because it
	  is purely software, e.g. the panic governor will stall it!

config BD70528_WATCHDOG
	tristate "ROHM BD70528 PMIC Watchdog"
	depends on MFD_ROHM_BD70528
	select WATCHDOG_CORE
	help
	  Support for the watchdog in the ROHM BD70528 PMIC. Watchdog trigger
	  cause system reset.

	  Say Y here to include support for the ROHM BD70528 watchdog.
	  Alternatively say M to compile the driver as a module,
	  which will be called bd70528_wdt.

config DA9052_WATCHDOG
	tristate "Dialog DA9052 Watchdog"
	depends on PMIC_DA9052 || COMPILE_TEST
@@ -552,7 +624,7 @@ config COH901327_WATCHDOG
	  compiled as a module.

config NPCM7XX_WATCHDOG
	bool "Nuvoton NPCM750 watchdog"
	tristate "Nuvoton NPCM750 watchdog"
	depends on ARCH_NPCM || COMPILE_TEST
	default y if ARCH_NPCM7XX
	select WATCHDOG_CORE
@@ -641,6 +713,22 @@ config IMX2_WDT
	  To compile this driver as a module, choose M here: the
	  module will be called imx2_wdt.

config IMX_SC_WDT
	tristate "IMX SC Watchdog"
	depends on HAVE_ARM_SMCCC
	select WATCHDOG_CORE
	help
	  This is the driver for the system controller watchdog
	  on the NXP i.MX SoCs with system controller inside, the
	  watchdog driver will call ARM SMC API and trap into
	  ARM-Trusted-Firmware for operations, ARM-Trusted-Firmware
	  will request system controller to execute the operations.
	  If you have one of these processors and wish to have
	  watchdog support enabled, say Y, otherwise say N.

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

config UX500_WATCHDOG
	tristate "ST-Ericsson Ux500 watchdog"
	depends on MFD_DB8500_PRCMU
@@ -1179,6 +1267,15 @@ config HP_WATCHDOG
	  To compile this driver as a module, choose M here: the module will be
	  called hpwdt.

config HPWDT_NMI_DECODING
	bool "NMI support for the HP ProLiant iLO2+ Hardware Watchdog Timer"
	depends on HP_WATCHDOG
	default y
	help
	  Enables the NMI handler for the watchdog pretimeout NMI and the iLO
	  "Generate NMI to System" virtual button.  When an NMI is claimed
	  by the driver, panic is called.

config KEMPLD_WDT
	tristate "Kontron COM Watchdog Timer"
	depends on MFD_KEMPLD
@@ -1190,15 +1287,6 @@ config KEMPLD_WDT
	  This driver can also be built as a module. If so, the module will be
	  called kempld_wdt.

config HPWDT_NMI_DECODING
	bool "NMI support for the HP ProLiant iLO2+ Hardware Watchdog Timer"
	depends on HP_WATCHDOG
	default y
	help
	  Enables the NMI handler for the watchdog pretimeout NMI and the iLO
	  "Generate NMI to System" virtual button.  When an NMI is claimed
	  by the driver, panic is called.

config SC1200_WDT
	tristate "National Semiconductor PC87307/PC97307 (ala SC1200) Watchdog"
	depends on X86
@@ -1647,7 +1735,7 @@ config BCM_KONA_WDT

config BCM_KONA_WDT_DEBUG
	bool "DEBUGFS support for BCM Kona Watchdog"
	depends on BCM_KONA_WDT || COMPILE_TEST
	depends on BCM_KONA_WDT
	help
	  If enabled, adds /sys/kernel/debug/bcm_kona_wdt/info which provides
	  access to the driver's internal data structures as well as watchdog
@@ -2024,53 +2112,4 @@ config USBPCWATCHDOG

	  Most people will say N.

comment "Watchdog Pretimeout Governors"

config WATCHDOG_PRETIMEOUT_GOV
	bool "Enable watchdog pretimeout governors"
	help
	  The option allows to select watchdog pretimeout governors.

if WATCHDOG_PRETIMEOUT_GOV

choice
	prompt "Default Watchdog Pretimeout Governor"
	default WATCHDOG_PRETIMEOUT_DEFAULT_GOV_PANIC
	help
	  This option selects a default watchdog pretimeout governor.
	  The governor takes its action, if a watchdog is capable
	  to report a pretimeout event.

config WATCHDOG_PRETIMEOUT_DEFAULT_GOV_NOOP
	bool "noop"
	select WATCHDOG_PRETIMEOUT_GOV_NOOP
	help
	  Use noop watchdog pretimeout governor by default. If noop
	  governor is selected by a user, write a short message to
	  the kernel log buffer and don't do any system changes.

config WATCHDOG_PRETIMEOUT_DEFAULT_GOV_PANIC
	bool "panic"
	select WATCHDOG_PRETIMEOUT_GOV_PANIC
	help
	  Use panic watchdog pretimeout governor by default, if
	  a watchdog pretimeout event happens, consider that
	  a watchdog feeder is dead and reboot is unavoidable.

endchoice

config WATCHDOG_PRETIMEOUT_GOV_NOOP
	tristate "Noop watchdog pretimeout governor"
	help
	  Noop watchdog pretimeout governor, only an informational
	  message is added to kernel log buffer.

config WATCHDOG_PRETIMEOUT_GOV_PANIC
	tristate "Panic watchdog pretimeout governor"
	help
	  Panic watchdog pretimeout governor, on watchdog pretimeout
	  event put the kernel into panic.

endif # WATCHDOG_PRETIMEOUT_GOV

endif # WATCHDOG
+2 −0
Original line number Diff line number Diff line
@@ -68,6 +68,7 @@ obj-$(CONFIG_NUC900_WATCHDOG) += nuc900_wdt.o
obj-$(CONFIG_TS4800_WATCHDOG) += ts4800_wdt.o
obj-$(CONFIG_TS72XX_WATCHDOG) += ts72xx_wdt.o
obj-$(CONFIG_IMX2_WDT) += imx2_wdt.o
obj-$(CONFIG_IMX_SC_WDT) += imx_sc_wdt.o
obj-$(CONFIG_UX500_WATCHDOG) += ux500_wdt.o
obj-$(CONFIG_RETU_WATCHDOG) += retu_wdt.o
obj-$(CONFIG_BCM2835_WDT) += bcm2835_wdt.o
@@ -205,6 +206,7 @@ obj-$(CONFIG_WATCHDOG_SUN4V) += sun4v_wdt.o
obj-$(CONFIG_XEN_WDT) += xen_wdt.o

# Architecture Independent
obj-$(CONFIG_BD70528_WATCHDOG) += bd70528_wdt.o
obj-$(CONFIG_DA9052_WATCHDOG) += da9052_wdt.o
obj-$(CONFIG_DA9055_WATCHDOG) += da9055_wdt.o
obj-$(CONFIG_DA9062_WATCHDOG) += da9062_wdt.o
+1 −1
Original line number Diff line number Diff line
@@ -277,8 +277,8 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
			return -EINVAL;
		timeout = new_timeout;
		wdt_keepalive();
		/* Fall through */
	}
		/* Fall through */
	case WDIOC_GETTIMEOUT:
		return put_user(timeout, p);
	default:
Loading