Module Name:    src
Committed By:   phx
Date:           Fri Sep 11 13:11:16 UTC 2009

Modified Files:
        src/sys/arch/amiga/dev: clock.c

Log Message:
Reverted last change after discussion with the author, Michael L. Hitch:
http://mail-index.netbsd.org/port-amiga/2009/08/14/msg007164.html
We have a full 32-bit counter, so the masking is not needed.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/amiga/dev/clock.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/amiga/dev/clock.c
diff -u src/sys/arch/amiga/dev/clock.c:1.48 src/sys/arch/amiga/dev/clock.c:1.49
--- src/sys/arch/amiga/dev/clock.c:1.48	Sun Dec  7 03:48:43 2008
+++ src/sys/arch/amiga/dev/clock.c	Fri Sep 11 13:11:15 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock.c,v 1.48 2008/12/07 03:48:43 mhitch Exp $ */
+/*	$NetBSD: clock.c,v 1.49 2009/09/11 13:11:15 phx Exp $ */
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.48 2008/12/07 03:48:43 mhitch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.49 2009/09/11 13:11:15 phx Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -112,7 +112,7 @@
 static struct timecounter clk_timecounter = {
 	clk_getcounter,	/* get_timecount */
 	0,		/* no poll_pps */
-	0x0fffu,	/* counter_mask */
+	~0u,		/* counter_mask */
 	0,		/* frequency */
 	"clock",	/* name, overriden later */
 	100,		/* quality */
@@ -159,7 +159,6 @@
 clockattach(struct device *pdp, struct device *dp, void *auxp)
 {
 	const char *clockchip;
-	u_int counter_mask;
 	unsigned short interval;
 #ifdef DRACO
 	u_char dracorev;
@@ -189,14 +188,8 @@
 
 	amiga_clk_interval = (eclockfreq / hz);
 
-	counter_mask = 0x8000;
-	while (counter_mask != 0 && (counter_mask & amiga_clk_interval) == 0)
-		counter_mask >>= 1;
-	counter_mask -= 1;
-
 	clk_timecounter.tc_name = clockchip;
 	clk_timecounter.tc_frequency = eclockfreq;
-	clk_timecounter.tc_counter_mask = counter_mask;
 
 	fast_delay_limit = UINT_MAX / amiga_clk_interval;
 

Reply via email to