Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/mca Compact autoconf info by printing the IRQ number...



details:   https://anonhg.NetBSD.org/src/rev/1e798939d34d
branches:  trunk
changeset: 508952:1e798939d34d
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Mon Apr 23 06:10:08 2001 +0000

description:
Compact autoconf info by printing the IRQ number together
with 'at mca0 slot foo' info.

diffstat:

 sys/dev/mca/aha_mca.c     |  14 ++++++++------
 sys/dev/mca/ed_mca.c      |   4 ++--
 sys/dev/mca/edc_mca.c     |   7 +++----
 sys/dev/mca/files.mca     |   6 +++++-
 sys/dev/mca/if_ate_mca.c  |   8 +++-----
 sys/dev/mca/if_elmc_mca.c |  16 +++++++---------
 sys/dev/mca/if_ep_mca.c   |  10 +++++-----
 sys/dev/mca/if_ne_mca.c   |   7 +++----
 sys/dev/mca/if_tr_mca.c   |  15 ++++++++-------
 sys/dev/mca/if_we_mca.c   |   5 ++---
 10 files changed, 46 insertions(+), 46 deletions(-)

diffs (truncated from 326 to 300 lines):

diff -r 8f201bcc49cb -r 1e798939d34d sys/dev/mca/aha_mca.c
--- a/sys/dev/mca/aha_mca.c     Mon Apr 23 05:45:43 2001 +0000
+++ b/sys/dev/mca/aha_mca.c     Mon Apr 23 06:10:08 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aha_mca.c,v 1.2 2001/04/05 12:22:05 jdolecek Exp $     */
+/*     $NetBSD: aha_mca.c,v 1.3 2001/04/23 06:10:08 jdolecek Exp $     */
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -116,7 +116,13 @@
        mca_chipset_tag_t mc = ma->ma_mc;
        bus_addr_t iobase;
 
-       printf(" slot %d: Adaptec AHA-1640 SCSI Adapter\n", ma->ma_slot + 1);
+       apd.sc_irq=(ma->ma_pos[4] & 0x7) + 8;
+       apd.sc_drq=ma->ma_pos[5] & 0xf;
+       apd.sc_scsi_dev=(ma->ma_pos[4] & 0xe0) >> 5;
+
+       printf(" slot %d irq %d: Adaptec AHA-1640 SCSI Adapter\n",
+               ma->ma_slot + 1,
+               apd.sc_irq);
 
        iobase=((ma->ma_pos[3] & 0x03) << 8) + 0x30 +
                ((ma->ma_pos[3] & 0x40) >> 4);
@@ -130,10 +136,6 @@
        sc->sc_ioh = ioh;
        sc->sc_dmat = ma->ma_dmat;
 
-       apd.sc_irq=(ma->ma_pos[4] & 0x7) + 8;
-       apd.sc_drq=ma->ma_pos[5] & 0xf;
-       apd.sc_scsi_dev=(ma->ma_pos[4] & 0xe0) >> 5;
-
 #ifdef notyet
        if (apd.sc_drq != -1)
                isa_dmacascade(mc, apd.sc_drq);
diff -r 8f201bcc49cb -r 1e798939d34d sys/dev/mca/ed_mca.c
--- a/sys/dev/mca/ed_mca.c      Mon Apr 23 05:45:43 2001 +0000
+++ b/sys/dev/mca/ed_mca.c      Mon Apr 23 06:10:08 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ed_mca.c,v 1.4 2001/04/22 11:52:18 jdolecek Exp $      */
+/*     $NetBSD: ed_mca.c,v 1.5 2001/04/23 06:10:08 jdolecek Exp $      */
 
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -1030,7 +1030,7 @@
        /*
         * Get Device Configuration (09).
         */
-       cmd_args[0] = 6;        /* Options: 00s110, s: 0=Physical 1=Pseudo */
+       cmd_args[0] = 14;       /* Options: 00s110, s: 0=Physical 1=Pseudo */
        cmd_args[1] = 0;
        if (edc_run_cmd(ed->edc_softc, CMD_GET_DEV_CONF, ed->sc_devno, cmd_args, 2, 0))
                return (1);
diff -r 8f201bcc49cb -r 1e798939d34d sys/dev/mca/edc_mca.c
--- a/sys/dev/mca/edc_mca.c     Mon Apr 23 05:45:43 2001 +0000
+++ b/sys/dev/mca/edc_mca.c     Mon Apr 23 06:10:08 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: edc_mca.c,v 1.5 2001/04/22 20:02:38 jdolecek Exp $     */
+/*     $NetBSD: edc_mca.c,v 1.6 2001/04/23 06:10:08 jdolecek Exp $     */
 
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -192,12 +192,12 @@
                /* never reached */
        }
                
-       printf(" slot %d: %s\n", ma->ma_slot+1, typestr);
-
        irq = ESDIC_IRQ;
        iobase = (pos2 & IO_IS_ALT) ? ESDIC_IOALT : ESDIC_IOPRM;
        drq = (pos2 & DRQ_MASK) >> 2;
 
+       printf(" slot %d irq %d: %s\n", ma->ma_slot+1, irq, typestr);
+
 #ifdef DIAGNOSTIC
        /*
         * It's not strictly necessary to check this, machine configuration
@@ -253,7 +253,6 @@
                        sc->sc_dev.dv_xname);
                return;
        }
-       printf("%s: interrupting at irq %d\n", sc->sc_dev.dv_xname, irq);
 
        /*
         * Integrated ESDI controller supports only one disk, other
diff -r 8f201bcc49cb -r 1e798939d34d sys/dev/mca/files.mca
--- a/sys/dev/mca/files.mca     Mon Apr 23 05:45:43 2001 +0000
+++ b/sys/dev/mca/files.mca     Mon Apr 23 06:10:08 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.mca,v 1.11 2001/04/20 07:37:42 jdolecek Exp $
+# $NetBSD: files.mca,v 1.12 2001/04/23 06:10:08 jdolecek Exp $
 #
 # Config.new file and device description for machine-independent MCA code.
 # Included by ports that need it.
@@ -52,3 +52,7 @@
 # Novell NE2000, and clones
 attach ne at mca with ne_mca
 file   dev/mca/if_ne_mca.c             ne_mca
+
+# AMD am7990 (Lance) -based boards
+attach le at mca with le_mca
+file   dev/mca/if_le_mca.c             le_mca
diff -r 8f201bcc49cb -r 1e798939d34d sys/dev/mca/if_ate_mca.c
--- a/sys/dev/mca/if_ate_mca.c  Mon Apr 23 05:45:43 2001 +0000
+++ b/sys/dev/mca/if_ate_mca.c  Mon Apr 23 06:10:08 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ate_mca.c,v 1.1 2001/03/31 00:43:05 jdolecek Exp $  */
+/*     $NetBSD: if_ate_mca.c,v 1.2 2001/04/23 06:10:08 jdolecek Exp $  */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -179,11 +179,11 @@
        }
 #endif
 
-       printf(" slot %d: %s\n", ma->ma_slot + 1, atp->at_name);
-
        iobase = ats_iobase[pos3 & 0x7];
        irq = ats_irq[((pos4 & 0x40) >> 4) | ((pos3 & 0xc0) >> 6)];
 
+       printf(" slot %d irq %d: %s\n", ma->ma_slot + 1, irq, atp->at_name);
+
        /* Map i/o space. */
        if (bus_space_map(iot, iobase, ATE_NPORTS, 0, &ioh)) {
                printf("%s: can't map i/o space\n", sc->sc_dev.dv_xname);
@@ -215,8 +215,6 @@
                    sc->sc_dev.dv_xname);
                return;
        }
-
-       printf("%s: interrupting at irq %d\n", sc->sc_dev.dv_xname, irq);
 }
 
 /*
diff -r 8f201bcc49cb -r 1e798939d34d sys/dev/mca/if_elmc_mca.c
--- a/sys/dev/mca/if_elmc_mca.c Mon Apr 23 05:45:43 2001 +0000
+++ b/sys/dev/mca/if_elmc_mca.c Mon Apr 23 06:10:08 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_elmc_mca.c,v 1.4 2001/03/29 08:56:27 jdolecek Exp $ */
+/*     $NetBSD: if_elmc_mca.c,v 1.5 2001/04/23 06:10:08 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -112,9 +112,6 @@
        bus_space_handle_t ioh, memh;
        u_int8_t myaddr[ETHER_ADDR_LEN];
 
-       printf(" slot %d: 3Com EtherLink/MC Ethernet Adapter (3C523)\n",
-               ma->ma_slot + 1);
-
        pos2 = mca_conf_read(ma->ma_mc, ma->ma_slot, 2);
        pos3 = mca_conf_read(ma->ma_mc, ma->ma_slot, 3);
 
@@ -149,6 +146,9 @@
 
        pbram_addr = ELMC_MADDR_BASE + (((pos2 & 24) >> 3) * 0x8000);
 
+       printf(" slot %d irq %d: 3Com EtherLink/MC Ethernet Adapter (3C523)\n",
+               ma->ma_slot + 1, irq);
+
        /* map the pio registers */
        if (bus_space_map(ma->ma_iot, iobase, ELMC_IOADDR_SIZE, 0, &ioh)) {
                printf("%s: unable to map i/o space\n", sc->sc_dev.dv_xname);
@@ -265,13 +265,11 @@
        /* establish interrupt handler */
        asc->sc_ih = mca_intr_establish(ma->ma_mc, irq, IPL_NET, i82586_intr,
                        sc);
-       if (asc->sc_ih == NULL)
+       if (asc->sc_ih == NULL) {
                printf("%s: couldn't establish interrupt handler\n",
                       sc->sc_dev.dv_xname);
-       else
-               printf("%s: interrupting at irq %d\n", sc->sc_dev.dv_xname,irq);
-
-       return;
+               return;
+       }
 }
 
 static void
diff -r 8f201bcc49cb -r 1e798939d34d sys/dev/mca/if_ep_mca.c
--- a/sys/dev/mca/if_ep_mca.c   Mon Apr 23 05:45:43 2001 +0000
+++ b/sys/dev/mca/if_ep_mca.c   Mon Apr 23 06:10:08 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ep_mca.c,v 1.2 2001/03/29 08:56:27 jdolecek Exp $   */
+/*     $NetBSD: if_ep_mca.c,v 1.3 2001/04/23 06:10:08 jdolecek Exp $   */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -199,10 +199,11 @@
         */
 
        iobase = MCA_CBIO + (((pos4 & 0xfc) >> 2) * 0x400);
+       irq = (pos5 & 0x0f);
 
        /* map the pio registers */
        if (bus_space_map(ma->ma_iot, iobase, MCA_IOSZ, 0, &ioh)) {
-               printf("%s: unable to map i/o space\n", sc->sc_dev.dv_xname);
+               printf(": unable to map i/o space\n", sc->sc_dev.dv_xname);
                return;
        }
 
@@ -215,7 +216,8 @@
                panic("ep_mca_attach: impossible");
        }
 
-       printf(" slot %d: 3Com %s\n", ma->ma_slot + 1, epp->epp_name);
+       printf(" slot %d irq %d: 3Com %s\n", ma->ma_slot + 1,
+               irq, epp->epp_name);
 
        sc->enable = NULL;
        sc->disable = NULL;
@@ -228,14 +230,12 @@
                return;
 
        /* Map and establish the interrupt. */
-       irq = (pos5 & 0x0f);
        sc->sc_ih = mca_intr_establish(ma->ma_mc, irq, IPL_NET, epintr, sc);
        if (sc->sc_ih == NULL) {
                printf("%s: couldn't establish interrupt handler\n",
                    sc->sc_dev.dv_xname);
                return;
        }
-       printf("%s: interrupting at irq %d\n", sc->sc_dev.dv_xname, irq);
 
        /*
         * Set default media to be same as the one selected in POS.
diff -r 8f201bcc49cb -r 1e798939d34d sys/dev/mca/if_ne_mca.c
--- a/sys/dev/mca/if_ne_mca.c   Mon Apr 23 05:45:43 2001 +0000
+++ b/sys/dev/mca/if_ne_mca.c   Mon Apr 23 06:10:08 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ne_mca.c,v 1.1 2001/04/20 07:37:42 jdolecek Exp $   */
+/*     $NetBSD: if_ne_mca.c,v 1.2 2001/04/23 06:10:08 jdolecek Exp $   */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -161,11 +161,11 @@
 
        np = ne_mca_lookup(ma->ma_id);
 
-       printf(" slot %d: %s\n", ma->ma_slot + 1, np->ne_name);
-
        iobase = ne_mca_iobase[(pos2 & 0x0e) >> 1];
        irq = ne_mca_irq[(pos2 & 0x60) >> 5];
        
+       printf(" slot %d irq %d: %s\n", ma->ma_slot + 1, irq, np->ne_name);
+
        nict = ma->ma_iot;
 
        /* Map the device. */
@@ -216,5 +216,4 @@
                       dsc->sc_dev.dv_xname);
                return;
        }
-       printf("%s: interrupting at irq %d\n", dsc->sc_dev.dv_xname, irq);
 }
diff -r 8f201bcc49cb -r 1e798939d34d sys/dev/mca/if_tr_mca.c
--- a/sys/dev/mca/if_tr_mca.c   Mon Apr 23 05:45:43 2001 +0000
+++ b/sys/dev/mca/if_tr_mca.c   Mon Apr 23 06:10:08 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_tr_mca.c,v 1.5 2001/04/05 12:20:26 jdolecek Exp $ */
+/* $NetBSD: if_tr_mca.c,v 1.6 2001/04/23 06:10:09 jdolecek Exp $ */
 
 /*_
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -122,9 +122,6 @@
        int pos2, pos3, pos4, pos5;
        const struct tr_mca_product *tp;
 
-       tp = tr_mca_lookup(ma->ma_id);
-       printf(" slot %d: %s\n", ma->ma_slot + 1, tp->tr_name);
-
        pos2 = mca_conf_read(ma->ma_mc, ma->ma_slot, 2);
        pos3 = mca_conf_read(ma->ma_mc, ma->ma_slot, 3);
        pos4 = mca_conf_read(ma->ma_mc, ma->ma_slot, 4);
@@ -170,6 +167,10 @@
        if (irq == 2)
                irq = 9;
 
+       tp = tr_mca_lookup(ma->ma_id);
+
+       printf(" slot %d irq %d: %s\n", ma->ma_slot + 1, irq, tp->tr_name);
+
        sram_size = 8 << (((pos3 & 0x0c) >> 2) + 10);
        sram_addr = (pos2 & 0xfe) << 12;
 
@@ -224,10 +225,10 @@
 
        /* establish interrupt handler */
        sc->sc_ih = mca_intr_establish(ma->ma_mc, irq, IPL_NET, tr_intr, sc);
-       if (sc->sc_ih == NULL)
+       if (sc->sc_ih == NULL) {
                printf("%s: couldn't establish interrupt handler\n",
                       sc->sc_dev.dv_xname);
-       else
-               printf("%s: interrupting at irq %d\n", sc->sc_dev.dv_xname, irq);
+               return;
+       }
 
 }



Home | Main Index | Thread Index | Old Index