* [PATCH] watchdog: dw_wdt: stop on reboot
@ 2022-11-18 15:08 Cosmin Tanislav
2022-11-18 22:08 ` Guenter Roeck
0 siblings, 1 reply; 2+ messages in thread
From: Cosmin Tanislav @ 2022-11-18 15:08 UTC (permalink / raw)
Cc: Wim Van Sebroeck, Guenter Roeck, linux-watchdog, linux-kernel,
Cosmin Tanislav
HW running watchdogs are just watchdogs that are enabled before the
Linux driver is probed, usually by the bootloader (eg. U-Boot).
When the system is shutting down, the mechanism for keeping a HW running
watchdog pinged is also stopped, but the watchdog itself is not stopped,
causing a reset, and preventing the system from being shut down.
Opt into stopping watchdogs on reboot.
Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
---
drivers/watchdog/dw_wdt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c
index 52962e8d11a6..462f15bd5ffa 100644
--- a/drivers/watchdog/dw_wdt.c
+++ b/drivers/watchdog/dw_wdt.c
@@ -663,6 +663,7 @@ static int dw_wdt_drv_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, dw_wdt);
watchdog_set_restart_priority(wdd, 128);
+ watchdog_stop_on_reboot(wdd);
ret = watchdog_register_device(wdd);
if (ret)
--
2.38.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] watchdog: dw_wdt: stop on reboot
2022-11-18 15:08 [PATCH] watchdog: dw_wdt: stop on reboot Cosmin Tanislav
@ 2022-11-18 22:08 ` Guenter Roeck
0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2022-11-18 22:08 UTC (permalink / raw)
To: Cosmin Tanislav
Cc: Wim Van Sebroeck, linux-watchdog, linux-kernel, Cosmin Tanislav
On Fri, Nov 18, 2022 at 05:08:09PM +0200, Cosmin Tanislav wrote:
> HW running watchdogs are just watchdogs that are enabled before the
> Linux driver is probed, usually by the bootloader (eg. U-Boot).
>
> When the system is shutting down, the mechanism for keeping a HW running
> watchdog pinged is also stopped, but the watchdog itself is not stopped,
> causing a reset, and preventing the system from being shut down.
>
> Opt into stopping watchdogs on reboot.
>
> Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/dw_wdt.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c
> index 52962e8d11a6..462f15bd5ffa 100644
> --- a/drivers/watchdog/dw_wdt.c
> +++ b/drivers/watchdog/dw_wdt.c
> @@ -663,6 +663,7 @@ static int dw_wdt_drv_probe(struct platform_device *pdev)
> platform_set_drvdata(pdev, dw_wdt);
>
> watchdog_set_restart_priority(wdd, 128);
> + watchdog_stop_on_reboot(wdd);
>
> ret = watchdog_register_device(wdd);
> if (ret)
> --
> 2.38.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-18 22:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-18 15:08 [PATCH] watchdog: dw_wdt: stop on reboot Cosmin Tanislav
2022-11-18 22:08 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®