diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-21 13:28:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-21 13:28:15 -0400 |
commit | e46096b6a33a698100cbe923f6cf7f05cd5ad1ad (patch) | |
tree | fd581c3e025ba6fcc952a11139c9ca20f49d9ef2 | |
parent | 6488ec263343337fdb090b15563864b293ce0340 (diff) | |
parent | 49d4d277ca54e04170d39484c8758a0ea9bca37d (diff) |
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.
-rw-r--r-- | MAINTAINERS | 2 | ||||
-rw-r--r-- | drivers/watchdog/aspeed_wdt.c | 7 | ||||
-rw-r--r-- | drivers/watchdog/renesas_wdt.c | 6 | ||||
-rw-r--r-- | drivers/watchdog/sch311x_wdt.c | 2 | ||||
-rw-r--r-- | drivers/watchdog/w83977f_wdt.c | 2 | ||||
-rw-r--r-- | drivers/watchdog/wafer5823wdt.c | 2 |
6 files changed, 15 insertions, 6 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index b7ff5654b8b5..6208fd1113a4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -6268,7 +6268,7 @@ S: Odd Fixes | |||
6268 | F: drivers/media/usb/hdpvr/ | 6268 | F: drivers/media/usb/hdpvr/ |
6269 | 6269 | ||
6270 | HEWLETT PACKARD ENTERPRISE ILO NMI WATCHDOG DRIVER | 6270 | HEWLETT PACKARD ENTERPRISE ILO NMI WATCHDOG DRIVER |
6271 | M: Jimmy Vance <jimmy.vance@hpe.com> | 6271 | M: Jerry Hoemann <jerry.hoemann@hpe.com> |
6272 | S: Supported | 6272 | S: Supported |
6273 | F: Documentation/watchdog/hpwdt.txt | 6273 | F: Documentation/watchdog/hpwdt.txt |
6274 | F: drivers/watchdog/hpwdt.c | 6274 | F: drivers/watchdog/hpwdt.c |
diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c index a5b8eb21201f..1abe4d021fd2 100644 --- a/drivers/watchdog/aspeed_wdt.c +++ b/drivers/watchdog/aspeed_wdt.c | |||
@@ -55,6 +55,8 @@ MODULE_DEVICE_TABLE(of, aspeed_wdt_of_table); | |||
55 | #define WDT_CTRL_WDT_INTR BIT(2) | 55 | #define WDT_CTRL_WDT_INTR BIT(2) |
56 | #define WDT_CTRL_RESET_SYSTEM BIT(1) | 56 | #define WDT_CTRL_RESET_SYSTEM BIT(1) |
57 | #define WDT_CTRL_ENABLE BIT(0) | 57 | #define WDT_CTRL_ENABLE BIT(0) |
58 | #define WDT_TIMEOUT_STATUS 0x10 | ||
59 | #define WDT_TIMEOUT_STATUS_BOOT_SECONDARY BIT(1) | ||
58 | 60 | ||
59 | /* | 61 | /* |
60 | * WDT_RESET_WIDTH controls the characteristics of the external pulse (if | 62 | * WDT_RESET_WIDTH controls the characteristics of the external pulse (if |
@@ -192,6 +194,7 @@ static int aspeed_wdt_probe(struct platform_device *pdev) | |||
192 | struct device_node *np; | 194 | struct device_node *np; |
193 | const char *reset_type; | 195 | const char *reset_type; |
194 | u32 duration; | 196 | u32 duration; |
197 | u32 status; | ||
195 | int ret; | 198 | int ret; |
196 | 199 | ||
197 | wdt = devm_kzalloc(&pdev->dev, sizeof(*wdt), GFP_KERNEL); | 200 | wdt = devm_kzalloc(&pdev->dev, sizeof(*wdt), GFP_KERNEL); |
@@ -307,6 +310,10 @@ static int aspeed_wdt_probe(struct platform_device *pdev) | |||
307 | writel(duration - 1, wdt->base + WDT_RESET_WIDTH); | 310 | writel(duration - 1, wdt->base + WDT_RESET_WIDTH); |
308 | } | 311 | } |
309 | 312 | ||
313 | status = readl(wdt->base + WDT_TIMEOUT_STATUS); | ||
314 | if (status & WDT_TIMEOUT_STATUS_BOOT_SECONDARY) | ||
315 | wdt->wdd.bootstatus = WDIOF_CARDRESET; | ||
316 | |||
310 | ret = devm_watchdog_register_device(&pdev->dev, &wdt->wdd); | 317 | ret = devm_watchdog_register_device(&pdev->dev, &wdt->wdd); |
311 | if (ret) { | 318 | if (ret) { |
312 | dev_err(&pdev->dev, "failed to register\n"); | 319 | dev_err(&pdev->dev, "failed to register\n"); |
diff --git a/drivers/watchdog/renesas_wdt.c b/drivers/watchdog/renesas_wdt.c index 6b8c6ddfe30b..514db5cc1595 100644 --- a/drivers/watchdog/renesas_wdt.c +++ b/drivers/watchdog/renesas_wdt.c | |||
@@ -121,7 +121,8 @@ static int rwdt_restart(struct watchdog_device *wdev, unsigned long action, | |||
121 | } | 121 | } |
122 | 122 | ||
123 | static const struct watchdog_info rwdt_ident = { | 123 | static const struct watchdog_info rwdt_ident = { |
124 | .options = WDIOF_MAGICCLOSE | WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT, | 124 | .options = WDIOF_MAGICCLOSE | WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | |
125 | WDIOF_CARDRESET, | ||
125 | .identity = "Renesas WDT Watchdog", | 126 | .identity = "Renesas WDT Watchdog", |
126 | }; | 127 | }; |
127 | 128 | ||
@@ -197,9 +198,10 @@ static int rwdt_probe(struct platform_device *pdev) | |||
197 | return PTR_ERR(clk); | 198 | return PTR_ERR(clk); |
198 | 199 | ||
199 | pm_runtime_enable(&pdev->dev); | 200 | pm_runtime_enable(&pdev->dev); |
200 | |||
201 | pm_runtime_get_sync(&pdev->dev); | 201 | pm_runtime_get_sync(&pdev->dev); |
202 | priv->clk_rate = clk_get_rate(clk); | 202 | priv->clk_rate = clk_get_rate(clk); |
203 | priv->wdev.bootstatus = (readb_relaxed(priv->base + RWTCSRA) & | ||
204 | RWTCSRA_WOVF) ? WDIOF_CARDRESET : 0; | ||
203 | pm_runtime_put(&pdev->dev); | 205 | pm_runtime_put(&pdev->dev); |
204 | 206 | ||
205 | if (!priv->clk_rate) { | 207 | if (!priv->clk_rate) { |
diff --git a/drivers/watchdog/sch311x_wdt.c b/drivers/watchdog/sch311x_wdt.c index 43d0cbb7ba0b..814cdf539b0f 100644 --- a/drivers/watchdog/sch311x_wdt.c +++ b/drivers/watchdog/sch311x_wdt.c | |||
@@ -299,7 +299,7 @@ static long sch311x_wdt_ioctl(struct file *file, unsigned int cmd, | |||
299 | if (sch311x_wdt_set_heartbeat(new_timeout)) | 299 | if (sch311x_wdt_set_heartbeat(new_timeout)) |
300 | return -EINVAL; | 300 | return -EINVAL; |
301 | sch311x_wdt_keepalive(); | 301 | sch311x_wdt_keepalive(); |
302 | /* Fall */ | 302 | /* Fall through */ |
303 | case WDIOC_GETTIMEOUT: | 303 | case WDIOC_GETTIMEOUT: |
304 | return put_user(timeout, p); | 304 | return put_user(timeout, p); |
305 | default: | 305 | default: |
diff --git a/drivers/watchdog/w83977f_wdt.c b/drivers/watchdog/w83977f_wdt.c index 20e2bba10400..672b61a7f9a3 100644 --- a/drivers/watchdog/w83977f_wdt.c +++ b/drivers/watchdog/w83977f_wdt.c | |||
@@ -427,7 +427,7 @@ static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
427 | return -EINVAL; | 427 | return -EINVAL; |
428 | 428 | ||
429 | wdt_keepalive(); | 429 | wdt_keepalive(); |
430 | /* Fall */ | 430 | /* Fall through */ |
431 | 431 | ||
432 | case WDIOC_GETTIMEOUT: | 432 | case WDIOC_GETTIMEOUT: |
433 | return put_user(timeout, uarg.i); | 433 | return put_user(timeout, uarg.i); |
diff --git a/drivers/watchdog/wafer5823wdt.c b/drivers/watchdog/wafer5823wdt.c index db0da7ea4fd8..93c5b610e264 100644 --- a/drivers/watchdog/wafer5823wdt.c +++ b/drivers/watchdog/wafer5823wdt.c | |||
@@ -178,7 +178,7 @@ static long wafwdt_ioctl(struct file *file, unsigned int cmd, | |||
178 | timeout = new_timeout; | 178 | timeout = new_timeout; |
179 | wafwdt_stop(); | 179 | wafwdt_stop(); |
180 | wafwdt_start(); | 180 | wafwdt_start(); |
181 | /* Fall */ | 181 | /* Fall through */ |
182 | case WDIOC_GETTIMEOUT: | 182 | case WDIOC_GETTIMEOUT: |
183 | return put_user(timeout, p); | 183 | return put_user(timeout, p); |
184 | 184 | ||