BSD 4_3_Net_2 release
[unix-history] / usr / src / sys / hp300 / stand / ite.c
index 50bb66c..3fe15d1 100644 (file)
@@ -7,11 +7,37 @@
  * the Systems Programming Group of the University of Utah Computer
  * Science Department.
  *
  * the Systems Programming Group of the University of Utah Computer
  * Science Department.
  *
- * %sccs.include.redist.c%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the University of
+ *     California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
  *
  *
- * from: Utah $Hdr: ite.c 1.19 89/08/22$
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
  *
  *
- *     @(#)ite.c       7.2 (Berkeley) %G%
+ * from: Utah $Hdr: ite.c 1.20 91/01/21$
+ *
+ *     @(#)ite.c       7.3 (Berkeley) 5/7/91
  */
 
 /*
  */
 
 /*
@@ -68,10 +94,10 @@ iteconfig()
        struct ite_softc *ip;
 
        i = 0;
        struct ite_softc *ip;
 
        i = 0;
-       for (hw = sc_table; hw < &sc_table[MAX_CTLR]; hw++) {
-               if (hw->hw_type != BITMAP)
+       for (hw = sc_table; hw < &sc_table[MAXCTLRS]; hw++) {
+               if (!HW_ISDEV(hw, D_BITMAP))
                        continue;
                        continue;
-               gr = (struct grfreg *) hw->hw_addr;
+               gr = (struct grfreg *) hw->hw_kva;
                /* XXX: redundent but safe */
                if (badaddr((caddr_t)gr) || gr->gr_id != GRFHWID)
                        continue;
                /* XXX: redundent but safe */
                if (badaddr((caddr_t)gr) || gr->gr_id != GRFHWID)
                        continue;
@@ -101,7 +127,7 @@ iteconfig()
                fboff = (gr->gr_fbomsb << 8) | gr->gr_fbolsb;
                ip->fbbase = (caddr_t) (*((u_char *)ip->regbase+fboff) << 16);
                /* DIO II: FB offset is relative to select code space */
                fboff = (gr->gr_fbomsb << 8) | gr->gr_fbolsb;
                ip->fbbase = (caddr_t) (*((u_char *)ip->regbase+fboff) << 16);
                /* DIO II: FB offset is relative to select code space */
-               if (ip->regbase >= (caddr_t)0x1000000)
+               if (ip->regbase >= (caddr_t)DIOIIBASE)
                        ip->fbbase += (int)ip->regbase;
                ip->flags = ITE_ALIVE|ITE_CONSOLE;
                ip->type = dtype;
                        ip->fbbase += (int)ip->regbase;
                ip->flags = ITE_ALIVE|ITE_CONSOLE;
                ip->type = dtype;