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
This commit is contained in:
Mitchell Horne 2024-11-16 15:54:46 -04:00
parent f334c0b8b3
commit 4b4e88d942

View file

@ -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);
}