Module Name: src
Committed By: jmcneill
Date: Sat Jun 17 22:49:37 UTC 2017
Modified Files:
src/sys/arch/arm/cortex: gtmr.c
Log Message:
Interrupts are enabled before the timer is configured. Ensure that the
timer is disabled when attaching so it doesn't go crazy between the time
interrupts are enabled and clocks are initialized. My RPI3 makes it
multi-user now.
To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/cortex/gtmr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/cortex/gtmr.c
diff -u src/sys/arch/arm/cortex/gtmr.c:1.17 src/sys/arch/arm/cortex/gtmr.c:1.18
--- src/sys/arch/arm/cortex/gtmr.c:1.17 Sun May 28 00:29:55 2017
+++ src/sys/arch/arm/cortex/gtmr.c Sat Jun 17 22:49:37 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: gtmr.c,v 1.17 2017/05/28 00:29:55 jmcneill Exp $ */
+/* $NetBSD: gtmr.c,v 1.18 2017/06/17 22:49:37 jmcneill Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gtmr.c,v 1.17 2017/05/28 00:29:55 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gtmr.c,v 1.18 2017/06/17 22:49:37 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -149,6 +149,10 @@ gtmr_attach(device_t parent, device_t se
gtmr_timecounter.tc_frequency = sc->sc_freq;
tc_init(>mr_timecounter);
+
+ /* Disable the timer until we are ready */
+ armreg_cntv_ctl_write(0);
+ armreg_cntp_ctl_write(0);
}
void