Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/arch/arm/cortex Pull up following revision(s) (reques...



details:   https://anonhg.NetBSD.org/src/rev/a68cc2b7d432
branches:  netbsd-8
changeset: 434017:a68cc2b7d432
user:      snj <snj%NetBSD.org@localhost>
date:      Wed Jun 21 17:47:48 2017 +0000

description:
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.

diffstat:

 sys/arch/arm/cortex/gtmr.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 3945165a5a6c -r a68cc2b7d432 sys/arch/arm/cortex/gtmr.c
--- a/sys/arch/arm/cortex/gtmr.c        Wed Jun 21 17:46:02 2017 +0000
+++ b/sys/arch/arm/cortex/gtmr.c        Wed Jun 21 17:47:48 2017 +0000
@@ -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_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



Home | Main Index | Thread Index | Old Index