Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm32/isa The io offsets in arm32/isa/timerreg.h in...



details:   https://anonhg.NetBSD.org/src/rev/bfd5357be9bb
branches:  trunk
changeset: 510604:bfd5357be9bb
user:      matthias <matthias%NetBSD.org@localhost>
date:      Sat Jun 02 12:51:28 2001 +0000

description:
The io offsets in arm32/isa/timerreg.h included the IO_TIMER1 offset.
With dev/ic/i8253reg.h this is not the case.
Add IO_TIMER1 to all offsets used in inb and outb. This fixes port-arm32/13009.

diffstat:

 sys/arch/arm32/isa/clock.c |  20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diffs (48 lines):

diff -r a76ac4d37a56 -r bfd5357be9bb sys/arch/arm32/isa/clock.c
--- a/sys/arch/arm32/isa/clock.c        Sat Jun 02 12:07:34 2001 +0000
+++ b/sys/arch/arm32/isa/clock.c        Sat Jun 02 12:51:28 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clock.c,v 1.6 2001/05/09 17:34:40 matt Exp $   */
+/*     $NetBSD: clock.c,v 1.7 2001/06/02 12:51:28 matthias Exp $       */
 
 /*
  * Copyright 1997
@@ -255,9 +255,9 @@
        timer0last     = 0;
 
        /* initialize 8253 clock */
-       outb(TIMER_MODE, TIMER_SEL0|TIMER_RATEGEN|TIMER_16BIT);
-       outb(TIMER_CNTR0, TIMER0_ROLLOVER % 256);
-       outb(TIMER_CNTR0, TIMER0_ROLLOVER / 256);
+       outb(IO_TIMER1 + TIMER_MODE, TIMER_SEL0|TIMER_RATEGEN|TIMER_16BIT);
+       outb(IO_TIMER1 + TIMER_CNTR0, TIMER0_ROLLOVER % 256);
+       outb(IO_TIMER1 + TIMER_CNTR0, TIMER0_ROLLOVER / 256);
 
 #ifdef TESTHAT
        hatCount = timer_hz_to_count(HATHZ);
@@ -399,9 +399,9 @@
        /* Don't want someone screwing with the counter while we're here. */
        savedints = disable_interrupts(I32_bit);
        /* Select counter 0 and latch it. */
-       outb(TIMER_MODE, TIMER_SEL0 | TIMER_LATCH);
-       lo = inb(TIMER_CNTR0);
-       hi = inb(TIMER_CNTR0);
+       outb(IO_TIMER1 + TIMER_MODE, TIMER_SEL0 | TIMER_LATCH);
+       lo = inb(IO_TIMER1 + TIMER_CNTR0);
+       hi = inb(IO_TIMER1 + TIMER_CNTR0);
        restore_interrupts(savedints);
        return ((hi << 8) | lo);
 }
@@ -494,9 +494,9 @@
 
        while (1) { /* loop until accurate enough */
          /* Put counter in count down mode */
-         outb(TIMER_MODE, TIMER_SEL0 | TIMER_16BIT | TIMER_RATEGEN);
-         outb(TIMER_CNTR0, 0xff);
-         outb(TIMER_CNTR0, 0xff);
+         outb(IO_TIMER1 + TIMER_MODE, TIMER_SEL0 | TIMER_16BIT | TIMER_RATEGEN);
+         outb(IO_TIMER1 + TIMER_CNTR0, 0xff);
+         outb(IO_TIMER1 + TIMER_CNTR0, 0xff);
          delayloop(guess);
 
          /* Read the value left in the counter */



Home | Main Index | Thread Index | Old Index