Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/isa Separate the namespace for default (ie unspecifi...



details:   https://anonhg.NetBSD.org/src/rev/d8d1945e6770
branches:  trunk
changeset: 569969:d8d1945e6770
user:      drochner <drochner%NetBSD.org@localhost>
date:      Tue Sep 14 20:20:46 2004 +0000

description:
Separate the namespace for default (ie unspecified) locators used
by the isa.c bus driver and the "address/whatever not specified"
argument passed to leaf device drivers.
The former is "ISACF_XXX_DEFAULT" as generaterd by config(8), the latter
"ISA_UNKNOWN_XXX", defined in isavar.h.
This way we save a dependency of every ISA device driver on "locators.h".

diffstat:

 sys/dev/isa/addcom_isa.c     |   8 ++++----
 sys/dev/isa/adv_isa.c        |  10 +++++-----
 sys/dev/isa/aha_isa.c        |  10 +++++-----
 sys/dev/isa/aic_isa.c        |   8 ++++----
 sys/dev/isa/ast.c            |   8 ++++----
 sys/dev/isa/atppc_isa.c      |  10 +++++-----
 sys/dev/isa/bha_isa.c        |  10 +++++-----
 sys/dev/isa/boca.c           |   8 ++++----
 sys/dev/isa/cec.c            |   8 ++++----
 sys/dev/isa/cms.c            |   6 +++---
 sys/dev/isa/com_isa.c        |   8 ++++----
 sys/dev/isa/cs89x0isa.c      |   6 +++---
 sys/dev/isa/cy_isa.c         |   8 ++++----
 sys/dev/isa/depca_isa.c      |   8 ++++----
 sys/dev/isa/dpt_isa.c        |  10 +++++-----
 sys/dev/isa/ega.c            |  12 ++++++------
 sys/dev/isa/esp_isa.c        |  10 +++++-----
 sys/dev/isa/ess_isa.c        |   6 +++---
 sys/dev/isa/fdc_isa.c        |  10 +++++-----
 sys/dev/isa/gus.c            |  28 +++++++++++++---------------
 sys/dev/isa/i82365_isa.c     |  12 ++++++------
 sys/dev/isa/i82365_isasubr.c |  18 +++++++++---------
 sys/dev/isa/if_ai.c          |  10 +++++-----
 sys/dev/isa/if_ate.c         |   8 ++++----
 sys/dev/isa/if_cs_isa.c      |  22 +++++++++++-----------
 sys/dev/isa/if_ec.c          |  16 ++++++++--------
 sys/dev/isa/if_ef.c          |  10 +++++-----
 sys/dev/isa/if_eg.c          |   8 ++++----
 sys/dev/isa/if_el.c          |   8 ++++----
 sys/dev/isa/if_ep_isa.c      |   8 ++++----
 sys/dev/isa/if_fmv_isa.c     |   8 ++++----
 sys/dev/isa/if_ix.c          |  14 +++++++-------
 sys/dev/isa/if_iy.c          |   8 ++++----
 sys/dev/isa/if_lc_isa.c      |  10 +++++-----
 sys/dev/isa/if_le_isa.c      |  12 ++++++------
 sys/dev/isa/if_ne_isa.c      |   8 ++++----
 sys/dev/isa/if_ntwoc_isa.c   |  12 ++++++------
 sys/dev/isa/if_sm_isa.c      |   8 ++++----
 sys/dev/isa/if_tribm_isa.c   |  12 ++++++------
 sys/dev/isa/if_trtcm_isa.c   |   8 ++++----
 sys/dev/isa/if_we_isa.c      |  16 ++++++++--------
 sys/dev/isa/ioat66.c         |   6 +++---
 sys/dev/isa/isavar.h         |  22 ++++++++++++----------
 sys/dev/isa/isic_isa.c       |  30 +++++++++++++++---------------
 sys/dev/isa/joy_isa.c        |   6 +++---
 sys/dev/isa/lm_isa.c         |   6 +++---
 sys/dev/isa/lpt_isa.c        |   8 ++++----
 sys/dev/isa/mcd.c            |   8 ++++----
 sys/dev/isa/moxa_isa.c       |   8 ++++----
 sys/dev/isa/mpu_isa.c        |   8 ++++----
 sys/dev/isa/nca_isa.c        |   8 ++++----
 sys/dev/isa/nsclpcsio_isa.c  |   6 +++---
 sys/dev/isa/opl_isa.c        |   6 +++---
 sys/dev/isa/pas.c            |   6 +++---
 sys/dev/isa/pcdisplay.c      |  12 ++++++------
 sys/dev/isa/pckbc_isa.c      |  12 ++++++------
 sys/dev/isa/pcppi.c          |  12 ++++++------
 sys/dev/isa/pss.c            |  16 ++++++++--------
 sys/dev/isa/rtfps.c          |  18 +++++++-----------
 sys/dev/isa/satlink.c        |   8 ++++----
 sys/dev/isa/seagate.c        |   8 ++++----
 sys/dev/isa/tcic2_isa.c      |  14 +++++++-------
 sys/dev/isa/tcom.c           |   8 ++++----
 sys/dev/isa/uha_isa.c        |  10 +++++-----
 sys/dev/isa/vga_isa.c        |  12 ++++++------
 sys/dev/isa/wdc_isa.c        |  12 ++++++------
 sys/dev/isa/wds.c            |  14 +++++++-------
 sys/dev/isa/wss_isa.c        |  10 +++++-----
 sys/dev/isa/wt.c             |   8 ++++----
 69 files changed, 363 insertions(+), 367 deletions(-)

diffs (truncated from 2830 to 300 lines):

diff -r c8f174b3ba6a -r d8d1945e6770 sys/dev/isa/addcom_isa.c
--- a/sys/dev/isa/addcom_isa.c  Tue Sep 14 19:57:37 2004 +0000
+++ b/sys/dev/isa/addcom_isa.c  Tue Sep 14 20:20:46 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: addcom_isa.c,v 1.10 2004/09/14 17:19:34 drochner Exp $ */
+/*     $NetBSD: addcom_isa.c,v 1.11 2004/09/14 20:20:46 drochner Exp $ */
 
 /*
  * Copyright (c) 2000 Michael Graff.  All rights reserved.
@@ -55,7 +55,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: addcom_isa.c,v 1.10 2004/09/14 17:19:34 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: addcom_isa.c,v 1.11 2004/09/14 20:20:46 drochner Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -136,9 +136,9 @@
                return (0);
 
        /* Disallow wildcarded i/o address. */
-       if (ia->ia_io[0].ir_addr == ISACF_PORT_DEFAULT)
+       if (ia->ia_io[0].ir_addr == ISA_UNKNOWN_PORT)
                return (0);
-       if (ia->ia_irq[0].ir_irq == ISACF_IRQ_DEFAULT)
+       if (ia->ia_irq[0].ir_irq == ISA_UNKNOWN_IRQ)
                return (0);
 
        iobase = ia->ia_io[0].ir_addr;
diff -r c8f174b3ba6a -r d8d1945e6770 sys/dev/isa/adv_isa.c
--- a/sys/dev/isa/adv_isa.c     Tue Sep 14 19:57:37 2004 +0000
+++ b/sys/dev/isa/adv_isa.c     Tue Sep 14 20:20:46 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: adv_isa.c,v 1.7 2002/10/02 02:14:45 thorpej Exp $      */
+/*     $NetBSD: adv_isa.c,v 1.8 2004/09/14 20:20:46 drochner Exp $     */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: adv_isa.c,v 1.7 2002/10/02 02:14:45 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: adv_isa.c,v 1.8 2004/09/14 20:20:46 drochner Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -136,7 +136,7 @@
         * If the I/O address is wildcarded, look for boards
         * in ascending order.
         */
-       if (ia->ia_io[0].ir_addr == ISACF_PORT_DEFAULT) {
+       if (ia->ia_io[0].ir_addr == ISA_UNKNOWN_PORT) {
                for (port_index = 0; port_index < ASC_IOADR_TABLE_MAX_IX;
                     port_index++) {
                        iobase = asc_ioport[port_index];
@@ -179,12 +179,12 @@
        drq = AscGetIsaDmaChannel(iot, ioh);
 
        /* Verify that the IRQ/DRQ match (or are wildcarded). */
-       if (ia->ia_irq[0].ir_irq != ISACF_IRQ_DEFAULT &&
+       if (ia->ia_irq[0].ir_irq != ISA_UNKNOWN_IRQ &&
            ia->ia_irq[0].ir_irq != irq) {
                rv = 0;
                goto out;
        }
-       if (ia->ia_drq[0].ir_drq != ISACF_DRQ_DEFAULT &&
+       if (ia->ia_drq[0].ir_drq != ISA_UNKNOWN_DRQ &&
            ia->ia_drq[0].ir_drq != drq) {
                rv = 0;
                goto out;
diff -r c8f174b3ba6a -r d8d1945e6770 sys/dev/isa/aha_isa.c
--- a/sys/dev/isa/aha_isa.c     Tue Sep 14 19:57:37 2004 +0000
+++ b/sys/dev/isa/aha_isa.c     Tue Sep 14 20:20:46 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aha_isa.c,v 1.17 2002/10/02 03:10:45 thorpej Exp $     */
+/*     $NetBSD: aha_isa.c,v 1.18 2004/09/14 20:20:46 drochner Exp $    */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aha_isa.c,v 1.17 2002/10/02 03:10:45 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aha_isa.c,v 1.18 2004/09/14 20:20:46 drochner Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -92,7 +92,7 @@
                return (0);
 
        /* Disallow wildcarded i/o address. */
-       if (ia->ia_io[0].ir_addr == ISACF_PORT_DEFAULT)
+       if (ia->ia_io[0].ir_addr == ISA_UNKNOWN_PORT)
                return (0);
 
        if (bus_space_map(iot, ia->ia_io[0].ir_addr, AHA_ISA_IOSIZE, 0, &ioh))
@@ -103,10 +103,10 @@
        bus_space_unmap(iot, ioh, AHA_ISA_IOSIZE);
 
        if (rv) {
-               if (ia->ia_irq[0].ir_irq != ISACF_IRQ_DEFAULT &&
+               if (ia->ia_irq[0].ir_irq != ISA_UNKNOWN_IRQ &&
                    ia->ia_irq[0].ir_irq != apd.sc_irq)
                        return (0);
-               if (ia->ia_drq[0].ir_drq != ISACF_DRQ_DEFAULT &&
+               if (ia->ia_drq[0].ir_drq != ISA_UNKNOWN_DRQ &&
                    ia->ia_drq[0].ir_drq != apd.sc_drq)
                        return (0);
 
diff -r c8f174b3ba6a -r d8d1945e6770 sys/dev/isa/aic_isa.c
--- a/sys/dev/isa/aic_isa.c     Tue Sep 14 19:57:37 2004 +0000
+++ b/sys/dev/isa/aic_isa.c     Tue Sep 14 20:20:46 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aic_isa.c,v 1.13 2002/10/02 03:10:45 thorpej Exp $     */
+/*     $NetBSD: aic_isa.c,v 1.14 2004/09/14 20:20:46 drochner Exp $    */
 
 /*
  * Copyright (c) 1994, 1995, 1996 Charles M. Hannum.  All rights reserved.
@@ -51,7 +51,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aic_isa.c,v 1.13 2002/10/02 03:10:45 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aic_isa.c,v 1.14 2004/09/14 20:20:46 drochner Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -117,11 +117,11 @@
                return (0);
 
        /* Disallow wildcarded i/o address. */
-       if (ia->ia_io[0].ir_addr == ISACF_PORT_DEFAULT)
+       if (ia->ia_io[0].ir_addr == ISA_UNKNOWN_PORT)
                return (0);
 
        /* Disallow wildcarded IRQ. */
-       if (ia->ia_irq[0].ir_irq == ISACF_IRQ_DEFAULT)
+       if (ia->ia_irq[0].ir_irq == ISA_UNKNOWN_IRQ)
                return (0);
 
        if (bus_space_map(iot, ia->ia_io[0].ir_addr, AIC_ISA_IOSIZE, 0, &ioh))
diff -r c8f174b3ba6a -r d8d1945e6770 sys/dev/isa/ast.c
--- a/sys/dev/isa/ast.c Tue Sep 14 19:57:37 2004 +0000
+++ b/sys/dev/isa/ast.c Tue Sep 14 20:20:46 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ast.c,v 1.53 2004/09/14 17:19:34 drochner Exp $        */
+/*     $NetBSD: ast.c,v 1.54 2004/09/14 20:20:46 drochner Exp $        */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ast.c,v 1.53 2004/09/14 17:19:34 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ast.c,v 1.54 2004/09/14 20:20:46 drochner Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -98,10 +98,10 @@
                return (0);
 
        /* Disallow wildcarded i/o address. */
-       if (ia->ia_io[0].ir_addr == ISACF_PORT_DEFAULT)
+       if (ia->ia_io[0].ir_addr == ISA_UNKNOWN_PORT)
                return (0);
 
-       if (ia->ia_irq[0].ir_irq == ISACF_IRQ_DEFAULT)
+       if (ia->ia_irq[0].ir_irq == ISA_UNKNOWN_IRQ)
                return (0);
 
        /* if the first port is in use as console, then it. */
diff -r c8f174b3ba6a -r d8d1945e6770 sys/dev/isa/atppc_isa.c
--- a/sys/dev/isa/atppc_isa.c   Tue Sep 14 19:57:37 2004 +0000
+++ b/sys/dev/isa/atppc_isa.c   Tue Sep 14 20:20:46 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atppc_isa.c,v 1.5 2004/01/28 13:51:16 drochner Exp $ */
+/* $NetBSD: atppc_isa.c,v 1.6 2004/09/14 20:20:46 drochner Exp $ */
 
 /*-
  * Copyright (c) 2001 Alcove - Nicolas Souchu
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atppc_isa.c,v 1.5 2004/01/28 13:51:16 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atppc_isa.c,v 1.6 2004/09/14 20:20:46 drochner Exp $");
 
 #include "opt_atppc.h"
 
@@ -107,7 +107,7 @@
                return (0);
 
        /* Disallow wildcarded i/o address */
-       if (ia->ia_io[0].ir_addr == ISACF_PORT_DEFAULT)
+       if (ia->ia_io[0].ir_addr == ISA_UNKNOWN_PORT)
                return (0);
 
        if (bus_space_map(iot, ia->ia_io[0].ir_addr, IO_LPTSIZE, 0, &ioh))
@@ -156,7 +156,7 @@
 
        /* Assign interrupt handler */
        if (!(self->dv_cfdata->cf_flags & ATPPC_FLAG_DISABLE_INTR)
-          && ia->ia_irq->ir_irq != ISACF_IRQ_DEFAULT
+          && ia->ia_irq->ir_irq != ISA_UNKNOWN_IRQ
           && ia->ia_nirq >= 1) {
                sc->sc_irq = ia->ia_irq[0].ir_irq;
        } else
@@ -172,7 +172,7 @@
 
        /* Configure DMA */
        if (!(self->dv_cfdata->cf_flags & ATPPC_FLAG_DISABLE_DMA)
-           && ia->ia_drq->ir_drq != ISACF_DRQ_DEFAULT
+           && ia->ia_drq->ir_drq != ISA_UNKNOWN_DRQ
            && ia->ia_ndrq >= 1)
                sc->sc_drq = ia->ia_drq[0].ir_drq;
        else
diff -r c8f174b3ba6a -r d8d1945e6770 sys/dev/isa/bha_isa.c
--- a/sys/dev/isa/bha_isa.c     Tue Sep 14 19:57:37 2004 +0000
+++ b/sys/dev/isa/bha_isa.c     Tue Sep 14 20:20:46 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bha_isa.c,v 1.24 2002/10/02 03:10:46 thorpej Exp $     */
+/*     $NetBSD: bha_isa.c,v 1.25 2004/09/14 20:20:46 drochner Exp $    */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bha_isa.c,v 1.24 2002/10/02 03:10:46 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bha_isa.c,v 1.25 2004/09/14 20:20:46 drochner Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -91,7 +91,7 @@
                return (0);
 
        /* Disallow wildcarded i/o address. */
-       if (ia->ia_io[0].ir_addr == ISACF_PORT_DEFAULT)
+       if (ia->ia_io[0].ir_addr == ISA_UNKNOWN_PORT)
                return (0);
 
        if (bus_space_map(iot, ia->ia_io[0].ir_addr, BHA_ISA_IOSIZE, 0, &ioh))
@@ -102,10 +102,10 @@
        bus_space_unmap(iot, ioh, BHA_ISA_IOSIZE);
 
        if (rv) {
-               if (ia->ia_irq[0].ir_irq != ISACF_IRQ_DEFAULT &&
+               if (ia->ia_irq[0].ir_irq != ISA_UNKNOWN_IRQ &&
                    ia->ia_irq[0].ir_irq != bpd.sc_irq)
                        return (0);
-               if (ia->ia_drq[0].ir_drq != ISACF_DRQ_DEFAULT &&
+               if (ia->ia_drq[0].ir_drq != ISA_UNKNOWN_DRQ &&
                    ia->ia_drq[0].ir_drq != bpd.sc_drq)
                        return (0);
 
diff -r c8f174b3ba6a -r d8d1945e6770 sys/dev/isa/boca.c
--- a/sys/dev/isa/boca.c        Tue Sep 14 19:57:37 2004 +0000
+++ b/sys/dev/isa/boca.c        Tue Sep 14 20:20:46 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: boca.c,v 1.42 2004/09/14 17:19:34 drochner Exp $       */
+/*     $NetBSD: boca.c,v 1.43 2004/09/14 20:20:46 drochner Exp $       */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: boca.c,v 1.42 2004/09/14 17:19:34 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: boca.c,v 1.43 2004/09/14 20:20:46 drochner Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -102,9 +102,9 @@
                return (0);
 
        /* Disallow wildcarded i/o address. */
-       if (ia->ia_io[0].ir_addr == ISACF_PORT_DEFAULT)
+       if (ia->ia_io[0].ir_addr == ISA_UNKNOWN_PORT)
                return (0);
-       if (ia->ia_irq[0].ir_irq == ISACF_IRQ_DEFAULT)
+       if (ia->ia_irq[0].ir_irq == ISA_UNKNOWN_IRQ)
                return (0);
 
        iobase = ia->ia_io[0].ir_addr;
diff -r c8f174b3ba6a -r d8d1945e6770 sys/dev/isa/cec.c
--- a/sys/dev/isa/cec.c Tue Sep 14 19:57:37 2004 +0000
+++ b/sys/dev/isa/cec.c Tue Sep 14 20:20:46 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cec.c,v 1.1 2003/06/02 03:57:15 gmcgarry Exp $ */
+/*     $NetBSD: cec.c,v 1.2 2004/09/14 20:20:46 drochner Exp $ */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@



Home | Main Index | Thread Index | Old Index