Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/bi Rename NODESIZE to BI_NODESIZE.



details:   https://anonhg.NetBSD.org/src/rev/dd9782c4fa93
branches:  trunk
changeset: 494472:dd9782c4fa93
user:      ragge <ragge%NetBSD.org@localhost>
date:      Thu Jul 06 17:47:02 2000 +0000

description:
Rename NODESIZE to BI_NODESIZE.

diffstat:

 sys/dev/bi/bi.c    |  10 ++++++----
 sys/dev/bi/bireg.h |   6 +++---
 2 files changed, 9 insertions(+), 7 deletions(-)

diffs (58 lines):

diff -r 217118d4db48 -r dd9782c4fa93 sys/dev/bi/bi.c
--- a/sys/dev/bi/bi.c   Thu Jul 06 17:45:52 2000 +0000
+++ b/sys/dev/bi/bi.c   Thu Jul 06 17:47:02 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bi.c,v 1.14 2000/03/26 11:45:04 ragge Exp $ */
+/*     $NetBSD: bi.c,v 1.15 2000/07/06 17:47:02 ragge Exp $ */
 /*
  * Copyright (c) 1996 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -77,9 +77,11 @@
 {
        struct bi_attach_args *ba = aux;
        struct bi_list *bl;
+       u_int16_t nr;
 
+       nr = bus_space_read_2(ba->ba_iot, ba->ba_ioh, 0);
        for (bl = &bi_list[0]; bl->bl_nr; bl++)
-               if (bl->bl_nr == bus_space_read_2(ba->ba_iot, ba->ba_ioh, 0))
+               if (bl->bl_nr == nr)
                        break;
 
        if (name) {
@@ -123,13 +125,13 @@
         */
        for (nodenr = 0; nodenr < NNODEBI; nodenr++) {
                if (bus_space_map(sc->sc_iot, sc->sc_addr + BI_NODE(nodenr),
-                   NODESIZE, 0, &ba.ba_ioh)) {
+                   BI_NODESIZE, 0, &ba.ba_ioh)) {
                        printf("bi_attach: bus_space_map failed, node %d\n", 
                            nodenr);
                        return;
                }
                if (badaddr((caddr_t)ba.ba_ioh, 4)) {
-                       bus_space_unmap(sc->sc_iot, ba.ba_ioh, NODESIZE);
+                       bus_space_unmap(sc->sc_iot, ba.ba_ioh, BI_NODESIZE);
                        continue;
                }
                ba.ba_nodenr = nodenr;
diff -r 217118d4db48 -r dd9782c4fa93 sys/dev/bi/bireg.h
--- a/sys/dev/bi/bireg.h        Thu Jul 06 17:45:52 2000 +0000
+++ b/sys/dev/bi/bireg.h        Thu Jul 06 17:47:02 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bireg.h,v 1.6 1999/08/04 19:12:22 ragge Exp $  */
+/*     $NetBSD: bireg.h,v 1.7 2000/07/06 17:47:02 ragge Exp $  */
 /*
  * Copyright (c) 1988 Regents of the University of California.
  * All rights reserved.
@@ -44,8 +44,8 @@
 /*
  * BI node addresses
  */
-#define        NODESIZE        0x2000  /* Size of one BI node */
-#define        BI_NODE(node)   (NODESIZE * (node))
+#define        BI_NODESIZE     0x2000  /* Size of one BI node */
+#define        BI_NODE(node)   (BI_NODESIZE * (node))
 #define        BI_BASE(bi,nod) ((0x20000000 + (bi) * 0x2000000) + BI_NODE(nod))
 #define        MAXNBI          16      /* Spec says there can be 16 anyway */
 #define        NNODEBI         16      /* 16 nodes per BI */



Home | Main Index | Thread Index | Old Index