mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 05:34:13 +08:00
linux-watchdog 4.17-rc2 tag
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) iEYEABECAAYFAlrUXbEACgkQ+iyteGJfRsoSSgCglHHxe51pHR+p395z2KdBEJAm 5CEAn0SNfw6PZw6F+P19yh4WBmT2QO6P =bKNy -----END PGP SIGNATURE----- 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.
This commit is contained in:
commit
e46096b6a3
@ -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
|
||||
|
@ -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");
|
||||
|
@ -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) {
|
||||
|
@ -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:
|
||||
|
@ -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);
|
||||
|
@ -178,7 +178,7 @@ static long wafwdt_ioctl(struct file *file, unsigned int cmd,
|
||||
timeout = new_timeout;
|
||||
wafwdt_stop();
|
||||
wafwdt_start();
|
||||
/* Fall */
|
||||
/* Fall through */
|
||||
case WDIOC_GETTIMEOUT:
|
||||
return put_user(timeout, p);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user