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

Commit e46096b6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'linux-watchdog-4.17-rc2' of git://www.linux-watchdog.org/linux-watchdog

Pull watchdog fixes from Wim Van Sebroeck:

 - fall-through fixes

 - MAINTAINER change for hpwdt

 - renesas-wdt: Add support for WDIOF_CARDRESET

 - aspeed: set bootstatus during probe

* tag 'linux-watchdog-4.17-rc2' of git://www.linux-watchdog.org/linux-watchdog:
  aspeed: watchdog: Set bootstatus during probe
  watchdog: renesas-wdt: Add support for WDIOF_CARDRESET
  watchdog: wafer5823wdt: Mark expected switch fall-through
  watchdog: w83977f_wdt: Mark expected switch fall-through
  watchdog: sch311x_wdt: Mark expected switch fall-through
  watchdog: hpwdt: change maintainer.
parents 6488ec26 49d4d277
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6268,7 +6268,7 @@ S: Odd Fixes
F:	drivers/media/usb/hdpvr/

HEWLETT PACKARD ENTERPRISE ILO NMI WATCHDOG DRIVER
M:	Jimmy Vance <jimmy.vance@hpe.com>
M:	Jerry Hoemann <jerry.hoemann@hpe.com>
S:	Supported
F:	Documentation/watchdog/hpwdt.txt
F:	drivers/watchdog/hpwdt.c
+7 −0
Original line number Diff line number Diff line
@@ -55,6 +55,8 @@ MODULE_DEVICE_TABLE(of, aspeed_wdt_of_table);
#define   WDT_CTRL_WDT_INTR		BIT(2)
#define   WDT_CTRL_RESET_SYSTEM		BIT(1)
#define   WDT_CTRL_ENABLE		BIT(0)
#define WDT_TIMEOUT_STATUS	0x10
#define   WDT_TIMEOUT_STATUS_BOOT_SECONDARY	BIT(1)

/*
 * WDT_RESET_WIDTH controls the characteristics of the external pulse (if
@@ -192,6 +194,7 @@ static int aspeed_wdt_probe(struct platform_device *pdev)
	struct device_node *np;
	const char *reset_type;
	u32 duration;
	u32 status;
	int ret;

	wdt = devm_kzalloc(&pdev->dev, sizeof(*wdt), GFP_KERNEL);
@@ -307,6 +310,10 @@ static int aspeed_wdt_probe(struct platform_device *pdev)
		writel(duration - 1, wdt->base + WDT_RESET_WIDTH);
	}

	status = readl(wdt->base + WDT_TIMEOUT_STATUS);
	if (status & WDT_TIMEOUT_STATUS_BOOT_SECONDARY)
		wdt->wdd.bootstatus = WDIOF_CARDRESET;

	ret = devm_watchdog_register_device(&pdev->dev, &wdt->wdd);
	if (ret) {
		dev_err(&pdev->dev, "failed to register\n");
+4 −2
Original line number Diff line number Diff line
@@ -121,7 +121,8 @@ static int rwdt_restart(struct watchdog_device *wdev, unsigned long action,
}

static const struct watchdog_info rwdt_ident = {
	.options = WDIOF_MAGICCLOSE | WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT,
	.options = WDIOF_MAGICCLOSE | WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT |
		WDIOF_CARDRESET,
	.identity = "Renesas WDT Watchdog",
};

@@ -197,9 +198,10 @@ static int rwdt_probe(struct platform_device *pdev)
		return PTR_ERR(clk);

	pm_runtime_enable(&pdev->dev);

	pm_runtime_get_sync(&pdev->dev);
	priv->clk_rate = clk_get_rate(clk);
	priv->wdev.bootstatus = (readb_relaxed(priv->base + RWTCSRA) &
				RWTCSRA_WOVF) ? WDIOF_CARDRESET : 0;
	pm_runtime_put(&pdev->dev);

	if (!priv->clk_rate) {
+1 −1
Original line number Diff line number Diff line
@@ -299,7 +299,7 @@ static long sch311x_wdt_ioctl(struct file *file, unsigned int cmd,
		if (sch311x_wdt_set_heartbeat(new_timeout))
			return -EINVAL;
		sch311x_wdt_keepalive();
		/* Fall */
		/* Fall through */
	case WDIOC_GETTIMEOUT:
		return put_user(timeout, p);
	default:
+1 −1
Original line number Diff line number Diff line
@@ -427,7 +427,7 @@ static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
			return -EINVAL;

		wdt_keepalive();
		/* Fall */
		/* Fall through */

	case WDIOC_GETTIMEOUT:
		return put_user(timeout, uarg.i);
Loading