Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/isa Rather than using a magic constant, use `com_scr...



details:   https://anonhg.NetBSD.org/src/rev/d954d05fe506
branches:  trunk
changeset: 486382:d954d05fe506
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat May 20 18:25:41 2000 +0000

description:
Rather than using a magic constant, use `com_scratch' as the offset
in UART space to the interrupt CSR.

diffstat:

 sys/dev/isa/ast.c  |  9 +++++----
 sys/dev/isa/boca.c |  7 ++++---
 2 files changed, 9 insertions(+), 7 deletions(-)

diffs (65 lines):

diff -r 16a57065ad71 -r d954d05fe506 sys/dev/isa/ast.c
--- a/sys/dev/isa/ast.c Sat May 20 17:56:54 2000 +0000
+++ b/sys/dev/isa/ast.c Sat May 20 18:25:41 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ast.c,v 1.45 1998/09/18 14:38:48 enami Exp $   */
+/*     $NetBSD: ast.c,v 1.46 2000/05/20 18:25:41 thorpej Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -169,7 +169,7 @@
        /*
         * Enable the master interrupt.
         */
-       bus_space_write_1(iot, sc->sc_slaveioh[3], 7, 0x80);
+       bus_space_write_1(iot, sc->sc_slaveioh[3], com_scratch, 0x80);
 
        for (i = 0; i < NSLAVES; i++) {
                ca.ca_slave = i;
@@ -196,7 +196,7 @@
        int alive = sc->sc_alive;
        int bits;
 
-       bits = ~bus_space_read_1(iot, sc->sc_slaveioh[3], 7) & alive;
+       bits = ~bus_space_read_1(iot, sc->sc_slaveioh[3], com_scratch) & alive;
        if (bits == 0)
                return (0);
 
@@ -209,7 +209,8 @@
                TRY(2);
                TRY(3);
 #undef TRY
-               bits = ~bus_space_read_1(iot, sc->sc_slaveioh[3], 7) & alive;
+               bits = ~bus_space_read_1(iot, sc->sc_slaveioh[3],
+                   com_scratch) & alive;
                if (bits == 0)
                        return (1);
        }
diff -r 16a57065ad71 -r d954d05fe506 sys/dev/isa/boca.c
--- a/sys/dev/isa/boca.c        Sat May 20 17:56:54 2000 +0000
+++ b/sys/dev/isa/boca.c        Sat May 20 18:25:41 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: boca.c,v 1.32 1998/09/18 14:38:48 enami Exp $  */
+/*     $NetBSD: boca.c,v 1.33 2000/05/20 18:25:41 thorpej Exp $        */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -192,7 +192,7 @@
        int alive = sc->sc_alive;
        int bits;
 
-       bits = bus_space_read_1(iot, sc->sc_slaveioh[0], 7) & alive;
+       bits = bus_space_read_1(iot, sc->sc_slaveioh[0], com_scratch) & alive;
        if (bits == 0)
                return (0);
 
@@ -209,7 +209,8 @@
                TRY(6);
                TRY(7);
 #undef TRY
-               bits = bus_space_read_1(iot, sc->sc_slaveioh[0], 7) & alive;
+               bits = bus_space_read_1(iot, sc->sc_slaveioh[0],
+                   com_scratch) & alive;
                if (bits == 0)
                        return (1);
        }



Home | Main Index | Thread Index | Old Index