Commit 4a08fe57 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

Pull watchdog updates from Wim Van Sebroeck:

 - support for NCT6116D

 - several small fixes and improvements

* tag 'linux-watchdog-5.5-rc1' of git://www.linux-watchdog.org/linux-watchdog: (24 commits)
  watchdog: jz4740: Drop dependency on MACH_JZ47xx
  watchdog: jz4740: Use regmap provided by TCU driver
  watchdog: jz4740: Use WDT clock provided by TCU driver
  dt-bindings: watchdog: sama5d4_wdt: add microchip,sam9x60-wdt compatible
  watchdog: sama5d4_wdt: cleanup the bit definitions
  watchdog: sprd: Fix the incorrect pointer getting from driver data
  watchdog: aspeed: Fix clock behaviour for ast2600
  watchdog: imx7ulp: Fix reboot hang
  watchdog: make nowayout sysfs file writable
  watchdog: prevent deferral of watchdogd wakeup on RT
  watchdog: imx7ulp: Use definitions instead of magic values
  watchdog: imx7ulp: Remove inline annotations
  watchdog: imx7ulp: Remove unused structure member
  watchdog: imx7ulp: Pass the wdog instance inimx7ulp_wdt_enable()
  watchdog: wdat_wdt: Spelling s/configrable/configurable/
  watchdog: bd70528: Trivial function documentation fix
  watchdog: cadence: Do not show error in case of deferred probe
  watchdog: Fix the race between the release of watchdog_core_data and cdev
  watchdog: sbc7240_wdt: Fix yet another -Wimplicit-fallthrough warning
  watchdog: intel-mid_wdt: Add WATCHDOG_NOWAYOUT support
  ...
parents 99a0d9f5 33c26ab4
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -17,8 +17,13 @@ What: /sys/class/watchdog/watchdogn/nowayout
Date:		August 2015
Contact:	Wim Van Sebroeck <wim@iguana.be>
Description:
		It is a read only file. While reading, it gives '1' if that
		device supports nowayout feature else, it gives '0'.
		It is a read/write file. While reading, it gives '1'
		if the device has the nowayout feature set, otherwise
		it gives '0'. Writing a '1' to the file enables the
		nowayout feature. Once set, the nowayout feature
		cannot be disabled, so writing a '0' either has no
		effect (if the feature was already disabled) or
		results in a permission error.

What:		/sys/class/watchdog/watchdogn/state
Date:		August 2015
+1 −1
Original line number Diff line number Diff line
* Atmel SAMA5D4 Watchdog Timer (WDT) Controller

Required properties:
- compatible: "atmel,sama5d4-wdt"
- compatible: "atmel,sama5d4-wdt" or "microchip,sam9x60-wdt"
- reg: base physical address and length of memory mapped region.

Optional properties:
+4 −1
Original line number Diff line number Diff line
@@ -1485,6 +1485,7 @@ config W83627HF_WDT
		NCT6791
		NCT6792
		NCT6102D/04D/06D
		NCT6116D

	  This watchdog simply watches your kernel to make sure it doesn't
	  freeze, and if it does, it reboots your computer after a certain
@@ -1641,8 +1642,10 @@ config INDYDOG

config JZ4740_WDT
	tristate "Ingenic jz4740 SoC hardware watchdog"
	depends on MACH_JZ4740 || MACH_JZ4780
	depends on MIPS
	depends on COMMON_CLK
	select WATCHDOG_CORE
	select MFD_SYSCON
	help
	  Hardware driver for the built-in watchdog timer on Ingenic jz4740 SoCs.

+10 −6
Original line number Diff line number Diff line
@@ -258,11 +258,6 @@ static int aspeed_wdt_probe(struct platform_device *pdev)
	if (IS_ERR(wdt->base))
		return PTR_ERR(wdt->base);

	/*
	 * The ast2400 wdt can run at PCLK, or 1MHz. The ast2500 only
	 * runs at 1MHz. We chose to always run at 1MHz, as there's no
	 * good reason to have a faster watchdog counter.
	 */
	wdt->wdd.info = &aspeed_wdt_info;
	wdt->wdd.ops = &aspeed_wdt_ops;
	wdt->wdd.max_hw_heartbeat_ms = WDT_MAX_TIMEOUT_MS;
@@ -278,6 +273,15 @@ static int aspeed_wdt_probe(struct platform_device *pdev)
		return -EINVAL;
	config = ofdid->data;

	/*
	 * On clock rates:
	 *  - ast2400 wdt can run at PCLK, or 1MHz
	 *  - ast2500 only runs at 1MHz, hard coding bit 4 to 1
	 *  - ast2600 always runs at 1MHz
	 *
	 * Set the ast2400 to run at 1MHz as it simplifies the driver.
	 */
	if (of_device_is_compatible(np, "aspeed,ast2400-wdt"))
		wdt->ctrl = WDT_CTRL_1MHZ_CLK;

	/*
+19 −15
Original line number Diff line number Diff line
@@ -4,33 +4,37 @@
 *
 * Copyright (C) 2007 Andrew Victor
 * Copyright (C) 2007 Atmel Corporation.
 * Copyright (C) 2019 Microchip Technology Inc. and its subsidiaries
 *
 * Watchdog Timer (WDT) - System peripherals regsters.
 * Based on AT91SAM9261 datasheet revision D.
 * Based on SAM9X60 datasheet.
 *
 */

#ifndef AT91_WDT_H
#define AT91_WDT_H

#include <linux/bits.h>

#define AT91_WDT_CR		0x00			/* Watchdog Control Register */
#define		AT91_WDT_WDRSTT		(1    << 0)		/* Restart */
#define		AT91_WDT_KEY		(0xa5 << 24)		/* KEY Password */
#define  AT91_WDT_WDRSTT	BIT(0)			/* Restart */
#define  AT91_WDT_KEY		(0xa5UL << 24)		/* KEY Password */

#define AT91_WDT_MR		0x04			/* Watchdog Mode Register */
#define		AT91_WDT_WDV		(0xfff << 0)		/* Counter Value */
#define  AT91_WDT_WDV		(0xfffUL << 0)		/* Counter Value */
#define  AT91_WDT_SET_WDV(x)	((x) & AT91_WDT_WDV)
#define		AT91_WDT_WDFIEN		(1     << 12)		/* Fault Interrupt Enable */
#define		AT91_WDT_WDRSTEN	(1     << 13)		/* Reset Processor */
#define		AT91_WDT_WDRPROC	(1     << 14)		/* Timer Restart */
#define		AT91_WDT_WDDIS		(1     << 15)		/* Watchdog Disable */
#define		AT91_WDT_WDD		(0xfff << 16)		/* Delta Value */
#define  AT91_WDT_WDFIEN	BIT(12)		/* Fault Interrupt Enable */
#define  AT91_WDT_WDRSTEN	BIT(13)		/* Reset Processor */
#define  AT91_WDT_WDRPROC	BIT(14)		/* Timer Restart */
#define  AT91_WDT_WDDIS		BIT(15)		/* Watchdog Disable */
#define  AT91_WDT_WDD		(0xfffUL << 16)		/* Delta Value */
#define  AT91_WDT_SET_WDD(x)	(((x) << 16) & AT91_WDT_WDD)
#define		AT91_WDT_WDDBGHLT	(1     << 28)		/* Debug Halt */
#define		AT91_WDT_WDIDLEHLT	(1     << 29)		/* Idle Halt */
#define  AT91_WDT_WDDBGHLT	BIT(28)		/* Debug Halt */
#define  AT91_WDT_WDIDLEHLT	BIT(29)		/* Idle Halt */

#define AT91_WDT_SR		0x08		/* Watchdog Status Register */
#define		AT91_WDT_WDUNF		(1 << 0)		/* Watchdog Underflow */
#define		AT91_WDT_WDERR		(1 << 1)		/* Watchdog Error */
#define  AT91_WDT_WDUNF		BIT(0)		/* Watchdog Underflow */
#define  AT91_WDT_WDERR		BIT(1)		/* Watchdog Error */

#endif
Loading