Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/alpha/tc Use an MI routine in ioasic_subr.c.



details:   https://anonhg.NetBSD.org/src/rev/9abf4a15671f
branches:  trunk
changeset: 477671:9abf4a15671f
user:      nisimura <nisimura%NetBSD.org@localhost>
date:      Wed Oct 27 10:16:00 1999 +0000

description:
Use an MI routine in ioasic_subr.c.

diffstat:

 sys/arch/alpha/tc/ioasic.c |  22 +++++-----------------
 1 files changed, 5 insertions(+), 17 deletions(-)

diffs (59 lines):

diff -r ea38044ffb2b -r 9abf4a15671f sys/arch/alpha/tc/ioasic.c
--- a/sys/arch/alpha/tc/ioasic.c        Wed Oct 27 10:04:41 1999 +0000
+++ b/sys/arch/alpha/tc/ioasic.c        Wed Oct 27 10:16:00 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ioasic.c,v 1.25 1999/10/01 09:19:44 nisimura Exp $ */
+/* $NetBSD: ioasic.c,v 1.26 1999/10/27 10:16:00 nisimura Exp $ */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: ioasic.c,v 1.25 1999/10/01 09:19:44 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ioasic.c,v 1.26 1999/10/27 10:16:00 nisimura Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -163,7 +163,6 @@
 {
        struct ioasic_softc *sc = (struct ioasic_softc *)self;
        struct tc_attach_args *ta = aux;
-       struct ioasicdev_attach_args ioasicdev;
        u_long i, ssr, imsk;
 
        ioasicfound = 1;
@@ -207,20 +206,10 @@
        }
        tc_intr_establish(parent, sc->sc_cookie, TC_IPL_NONE, ioasic_intr, sc);
 
-        /*
+       /*
         * Try to configure each device.
         */
-        for (i = 0; i < ioasic_ndevs; i++) {
-               strncpy(ioasicdev.iada_modname, ioasic_devs[i].iad_modname,
-                       TC_ROM_LLEN);
-               ioasicdev.iada_modname[TC_ROM_LLEN] = '\0';
-               ioasicdev.iada_offset = ioasic_devs[i].iad_offset;
-               ioasicdev.iada_addr = sc->sc_base + ioasic_devs[i].iad_offset;
-               ioasicdev.iada_cookie = ioasic_devs[i].iad_cookie;
-
-                /* Tell the autoconfig machinery we've found the hardware. */
-                config_found(self, &ioasicdev, ioasicprint);
-        }
+       ioasic_attach_devs(sc, ioasic_devs, ioasic_ndevs);
 }
 
 void
@@ -297,8 +286,7 @@
 }
 
 /*
- * asic_intr --
- *     ASIC interrupt handler.
+ * ASIC interrupt handler.
  */
 int
 ioasic_intr(val)



Home | Main Index | Thread Index | Old Index