Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/i386/isa Fix previous (need to add IO_TIMER1 to the...



details:   https://anonhg.NetBSD.org/src/rev/eafd172da67c
branches:  trunk
changeset: 535257:eafd172da67c
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Aug 13 02:42:54 2002 +0000

description:
Fix previous (need to add IO_TIMER1 to the register offsets).

diffstat:

 sys/arch/i386/isa/joy_timer.c |  13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diffs (40 lines):

diff -r 84b212bd5237 -r eafd172da67c sys/arch/i386/isa/joy_timer.c
--- a/sys/arch/i386/isa/joy_timer.c     Tue Aug 13 02:17:45 2002 +0000
+++ b/sys/arch/i386/isa/joy_timer.c     Tue Aug 13 02:42:54 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: joy_timer.c,v 1.2 2002/08/13 02:17:45 itojun Exp $     */
+/*     $NetBSD: joy_timer.c,v 1.3 2002/08/13 02:42:54 thorpej Exp $    */
 
 /*
  * XXX This _really_ should be rewritten such that it doesn't
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: joy_timer.c,v 1.2 2002/08/13 02:17:45 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: joy_timer.c,v 1.3 2002/08/13 02:42:54 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -57,17 +57,16 @@
 #include <dev/isa/isareg.h>
 
 #include <dev/ic/joyvar.h>
-
-#include <dev/ic/i8253reg.h>
+#include <dev/ic/i8253reg.h>           /* XXX XXX XXX */
 
 int
 joy_get_tick()
 {
        int low, high;
 
-       outb(TIMER_MODE, TIMER_SEL0);
-       low = inb(TIMER_CNTR0);
-       high = inb(TIMER_CNTR0);
+       outb(IO_TIMER1+TIMER_MODE, TIMER_SEL0);
+       low = inb(IO_TIMER1+TIMER_CNTR0);
+       high = inb(IO_TIMER1+TIMER_CNTR0);
 
        return ((high << 8) | low);
 }



Home | Main Index | Thread Index | Old Index