Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/amiga/dev Reverted last change after discussion wit...



details:   https://anonhg.NetBSD.org/src/rev/2703a4a657c4
branches:  trunk
changeset: 747326:2703a4a657c4
user:      phx <phx%NetBSD.org@localhost>
date:      Fri Sep 11 13:11:15 2009 +0000

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

diffstat:

 sys/arch/amiga/dev/clock.c |  13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)

diffs (50 lines):

diff -r 3e1f43c21cba -r 2703a4a657c4 sys/arch/amiga/dev/clock.c
--- a/sys/arch/amiga/dev/clock.c        Fri Sep 11 12:00:12 2009 +0000
+++ b/sys/arch/amiga/dev/clock.c        Fri Sep 11 13:11:15 2009 +0000
@@ -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;
 



Home | Main Index | Thread Index | Old Index