Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/allwinner Add disarm support
details: https://anonhg.NetBSD.org/src/rev/49c4e39ff92c
branches: trunk
changeset: 338882:49c4e39ff92c
user: martin <martin%NetBSD.org@localhost>
date: Sun Jun 14 08:32:02 2015 +0000
description:
Add disarm support
diffstat:
sys/arch/arm/allwinner/awin_wdt.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diffs (29 lines):
diff -r a945ba9b01c4 -r 49c4e39ff92c sys/arch/arm/allwinner/awin_wdt.c
--- a/sys/arch/arm/allwinner/awin_wdt.c Sat Jun 13 23:55:18 2015 +0000
+++ b/sys/arch/arm/allwinner/awin_wdt.c Sun Jun 14 08:32:02 2015 +0000
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: awin_wdt.c,v 1.8 2015/06/09 12:46:37 martin Exp $");
+__KERNEL_RCSID(1, "$NetBSD: awin_wdt.c,v 1.9 2015/06/14 08:32:02 martin Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -145,10 +145,12 @@
}
if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_DISARMED) {
- /*
- * We can't disarm the watchdog.
- */
- return sc->sc_wdog_armed ? EBUSY : 0;
+ if (sc->sc_wdog_armed)
+ /* can not disarm pre-armed kernel mode wdog */
+ return EBUSY;
+
+ bus_space_write_4(sc->sc_bst, sc->sc_bsh, sc->sc_mode_reg, 0);
+ return 0;
}
if (sc->sc_wdog_armed && smw->smw_period == sc->sc_wdog_period) {
Home |
Main Index |
Thread Index |
Old Index