Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/fdt Deactivate the watchdog timer during attach.
details: https://anonhg.NetBSD.org/src/rev/c5089bf53c51
branches: trunk
changeset: 994256:c5089bf53c51
user: aymeric <aymeric%NetBSD.org@localhost>
date: Sun Oct 28 15:06:10 2018 +0000
description:
Deactivate the watchdog timer during attach.
Recent u-boot starts up the watchdog timer, and we don't detect this so
e.g. my DE0 nanosoc reboots after about 20 seconds. Applying a reset to
the watchdog circuit is the only way to stop it according to the
documentation.
diffstat:
sys/dev/fdt/dwcwdt_fdt.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r 47714dd4788d -r c5089bf53c51 sys/dev/fdt/dwcwdt_fdt.c
--- a/sys/dev/fdt/dwcwdt_fdt.c Sun Oct 28 15:00:19 2018 +0000
+++ b/sys/dev/fdt/dwcwdt_fdt.c Sun Oct 28 15:06:10 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwcwdt_fdt.c,v 1.2 2018/10/14 18:28:55 aymeric Exp $ */
+/* $NetBSD: dwcwdt_fdt.c,v 1.3 2018/10/28 15:06:10 aymeric Exp $ */
/*-
* Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwcwdt_fdt.c,v 1.2 2018/10/14 18:28:55 aymeric Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwcwdt_fdt.c,v 1.3 2018/10/28 15:06:10 aymeric Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -191,6 +191,10 @@
return;
}
rst = fdtbus_reset_get_index(phandle, 0);
+ if (rst && fdtbus_reset_assert(rst) != 0) {
+ aprint_error(": couldn't assert reset\n");
+ return;
+ }
if (rst && fdtbus_reset_deassert(rst) != 0) {
aprint_error(": couldn't de-assert reset\n");
return;
Home |
Main Index |
Thread Index |
Old Index