From 4b4e88d9425b59a377a71ffeb553376b1c60a80e Mon Sep 17 00:00:00 2001 From: Mitchell Horne Date: Sat, 16 Nov 2024 15:54:46 -0400 Subject: [PATCH] aw_wdog: disable timer on attach Otherwise it may cause system reset before the watchdog can be pat. This is consistent with other watchdog drivers. Tested on Allwinner D1. Reviewed by: manu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47517 --- sys/arm/allwinner/aw_wdog.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/arm/allwinner/aw_wdog.c b/sys/arm/allwinner/aw_wdog.c index 5c087464c9e..acfbdd8fe6d 100644 --- a/sys/arm/allwinner/aw_wdog.c +++ b/sys/arm/allwinner/aw_wdog.c @@ -202,6 +202,9 @@ aw_wdog_attach(device_t dev) EVENTHANDLER_REGISTER(shutdown_final, aw_wdog_shutdown_fn, sc, SHUTDOWN_PRI_LAST - 1); + /* Disable watchdog for now. */ + WRITE(sc, sc->wdog_mode, sc->wdog_mode_key); + return (0); }