Module Name:    src
Committed By:   snj
Date:           Wed Jun 21 17:47:48 UTC 2017

Modified Files:
        src/sys/arch/arm/cortex [netbsd-8]: gtmr.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #45):
        sys/arch/arm/cortex/gtmr.c: revision 1.18
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.17.2.1 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.17.2.1
--- src/sys/arch/arm/cortex/gtmr.c:1.17	Sun May 28 00:29:55 2017
+++ src/sys/arch/arm/cortex/gtmr.c	Wed Jun 21 17:47:48 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: gtmr.c,v 1.17 2017/05/28 00:29:55 jmcneill Exp $	*/
+/*	$NetBSD: gtmr.c,v 1.17.2.1 2017/06/21 17:47:48 snj 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.17.2.1 2017/06/21 17:47:48 snj 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(&gtmr_timecounter);
+
+	/* Disable the timer until we are ready */
+	armreg_cntv_ctl_write(0);
+	armreg_cntp_ctl_write(0);
 }
 
 void

Reply via email to