CVS commit: [netbsd-6] src/sys/arch/arm/broadcom

2014-12-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec 21 20:19:21 UTC 2014

Modified Files:
src/sys/arch/arm/broadcom [netbsd-6]: bcm2835_tmr.c

Log Message:
Pull up following revision(s) (requested by nat in ticket #1214):
sys/arch/arm/broadcom/bcm2835_tmr.c: revision 1.4
Clear status of BCM2835_STIMER_M3 only as timer comparison reg 0 and 2
are used by the VideoCore on Raspberry Pi.  This fixes audio playback.
Addresses PR 48805.
This commit was approved by skrll@


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/arch/arm/broadcom/bcm2835_tmr.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/broadcom/bcm2835_tmr.c
diff -u src/sys/arch/arm/broadcom/bcm2835_tmr.c:1.1.2.4 src/sys/arch/arm/broadcom/bcm2835_tmr.c:1.1.2.5
--- src/sys/arch/arm/broadcom/bcm2835_tmr.c:1.1.2.4	Wed Feb 13 01:36:14 2013
+++ src/sys/arch/arm/broadcom/bcm2835_tmr.c	Sun Dec 21 20:19:21 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm2835_tmr.c,v 1.1.2.4 2013/02/13 01:36:14 riz Exp $	*/
+/*	$NetBSD: bcm2835_tmr.c,v 1.1.2.5 2014/12/21 20:19:21 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_tmr.c,v 1.1.2.4 2013/02/13 01:36:14 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_tmr.c,v 1.1.2.5 2014/12/21 20:19:21 msaitoh Exp $");
 
 #include 
 #include 
@@ -201,7 +201,7 @@ clockhandler(void *arg)
 	if (!(status & BCM2835_STIMER_M3))
 		return 0;
 
-	bus_space_write_4(sc->sc_iot, sc->sc_ioh, BCM2835_STIMER_CS, status);
+	bus_space_write_4(sc->sc_iot, sc->sc_ioh, BCM2835_STIMER_CS, BCM2835_STIMER_M3);
 
 	hardclock(frame);
 



CVS commit: [netbsd-6] src/sys/arch/arm/broadcom

2012-11-24 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Sat Nov 24 19:14:49 UTC 2012

Modified Files:
src/sys/arch/arm/broadcom [netbsd-6]: bcm2835_tmr.c

Log Message:
Pull up revision 1.2 (requested by skrll in ticket #704).

Fix delay.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/arch/arm/broadcom/bcm2835_tmr.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/broadcom/bcm2835_tmr.c
diff -u src/sys/arch/arm/broadcom/bcm2835_tmr.c:1.1.2.2 src/sys/arch/arm/broadcom/bcm2835_tmr.c:1.1.2.3
--- src/sys/arch/arm/broadcom/bcm2835_tmr.c:1.1.2.2	Thu Aug  9 06:36:50 2012
+++ src/sys/arch/arm/broadcom/bcm2835_tmr.c	Sat Nov 24 19:14:49 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm2835_tmr.c,v 1.1.2.2 2012/08/09 06:36:50 jdc Exp $	*/
+/*	$NetBSD: bcm2835_tmr.c,v 1.1.2.3 2012/11/24 19:14:49 jdc Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_tmr.c,v 1.1.2.2 2012/08/09 06:36:50 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_tmr.c,v 1.1.2.3 2012/11/24 19:14:49 jdc Exp $");
 
 #include 
 #include 
@@ -159,22 +159,19 @@ delay(unsigned int n)
 	uint32_t delta, usecs;
 
 	KASSERT(sc != NULL);
-	int nhloops = 0;
 
 	last = bus_space_read_4(sc->sc_iot, sc->sc_ioh, BCM2835_STIMER_CLO);
 
 	delta = usecs = 0;
 	while (n > usecs) {
-		if (nhloops++ > 0x10) Debugger();
 		curr = bus_space_read_4(sc->sc_iot, sc->sc_ioh,
 		BCM2835_STIMER_CLO);
 
-		/* XXXNH !?!?!?!?!?!?! - use CHI? */
 		/* Check to see if the timer has wrapped around. */
 		if (curr < last)
-			delta += (last + (counts_per_hz - curr));
+			delta += curr + (UINT32_MAX - last);
 		else
-			delta += (last - curr);
+			delta += curr - last;
 
 		last = curr;
 



CVS commit: [netbsd-6] src/sys/arch/arm/broadcom

2012-08-19 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Aug 19 17:45:23 UTC 2012

Modified Files:
src/sys/arch/arm/broadcom [netbsd-6]: bcm2835_intr.c

Log Message:
Pull up following revision(s) (requested by skrll in ticket #515):
sys/arch/arm/broadcom/bcm2835_intr.c: revision 1.2
Fix two copypasteos that resulted in interrupt strings being wrong for
(among other interrutps) the plcom(4) and the sdhc(4).


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/arch/arm/broadcom/bcm2835_intr.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/broadcom/bcm2835_intr.c
diff -u src/sys/arch/arm/broadcom/bcm2835_intr.c:1.1.2.2 src/sys/arch/arm/broadcom/bcm2835_intr.c:1.1.2.3
--- src/sys/arch/arm/broadcom/bcm2835_intr.c:1.1.2.2	Thu Aug  9 06:36:49 2012
+++ src/sys/arch/arm/broadcom/bcm2835_intr.c	Sun Aug 19 17:45:23 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm2835_intr.c,v 1.1.2.2 2012/08/09 06:36:49 jdc Exp $	*/
+/*	$NetBSD: bcm2835_intr.c,v 1.1.2.3 2012/08/19 17:45:23 riz Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.1.2.2 2012/08/09 06:36:49 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.1.2.3 2012/08/19 17:45:23 riz Exp $");
 
 #define _INTR_PRIVATE
 
@@ -93,8 +93,8 @@ struct bcm2835icu_softc *bcmicu_sc;
 static const char * const bcm2835_sources[BCM2835_NIRQ] = {
 	"(unused  0)",	"(unused  1)",	"(unused  2)",	"timer3",
 	"(unused  4)",	"(unused  5)",	"(unused  6)",	"jpeg",
-	"(unused  8)",	"usb",		"(unused 10)",	"(unused 11)"
-	"(unused 12)",	"(unused 13)",	"(unused 14)",	"(unused 15)"
+	"(unused  8)",	"usb",		"(unused 10)",	"(unused 11)",
+	"(unused 12)",	"(unused 13)",	"(unused 14)",	"(unused 15)",
 	"(unused 16)",	"(unused 17)",	"dma2",		"dma3",
 	"(unused 20)",	"(unused 21)",	"(unused 22)",	"(unused 23)",
 	"(unused 24)",	"(unused 25)",	"(unused 26)",	"(unused 27)",