Source-Changes-HG archive

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

[src/trunk]: src/sys Remove old-style boot device recognition.



details:   https://anonhg.NetBSD.org/src/rev/4bfeb37c313b
branches:  trunk
changeset: 480404:4bfeb37c313b
user:      pk <pk%NetBSD.org@localhost>
date:      Tue Jan 11 12:59:43 2000 +0000

description:
Remove old-style boot device recognition.

diffstat:

 sys/arch/sparc/dev/esp_obio.c     |  10 +----
 sys/arch/sparc/dev/fd.c           |  55 ++------------------------
 sys/arch/sparc/dev/if_ie_obio.c   |   8 +---
 sys/arch/sparc/dev/if_le_obio.c   |   8 +---
 sys/arch/sparc/dev/obio.c         |  11 +----
 sys/arch/sparc/dev/sbus.c         |  25 +++--------
 sys/arch/sparc/dev/si.c           |  15 +------
 sys/arch/sparc/dev/vme_machdep.c  |   9 +---
 sys/arch/sparc/include/autoconf.h |  17 +------
 sys/arch/sparc/sparc/autoconf.c   |  81 ++++++++------------------------------
 sys/arch/sparc/sparc/disksubr.c   |  64 +-----------------------------
 sys/arch/sparc/sparc/iommu.c      |  10 +----
 sys/arch/sparc/sparc/iommuvar.h   |   3 +-
 sys/dev/sbus/dma_sbus.c           |  18 +-------
 sys/dev/sbus/esp_sbus.c           |  22 +----------
 sys/dev/sbus/if_le.c              |  10 +----
 sys/dev/sbus/if_le_lebuffer.c     |  10 +----
 sys/dev/sbus/if_le_ledma.c        |   9 +---
 sys/dev/sbus/lebuffer.c           |  11 +----
 sys/dev/sbus/qec.c                |  11 +----
 sys/dev/sbus/sbusvar.h            |   7 +--
 sys/dev/sbus/xbox.c               |  10 +----
 sys/dev/sbus/xboxvar.h            |   3 +-
 23 files changed, 58 insertions(+), 369 deletions(-)

diffs (truncated from 1161 to 300 lines):

diff -r 193fad48e5d4 -r 4bfeb37c313b sys/arch/sparc/dev/esp_obio.c
--- a/sys/arch/sparc/dev/esp_obio.c     Tue Jan 11 10:53:01 2000 +0000
+++ b/sys/arch/sparc/dev/esp_obio.c     Tue Jan 11 12:59:43 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: esp_obio.c,v 1.4 1998/11/19 21:49:17 thorpej Exp $     */
+/*     $NetBSD: esp_obio.c,v 1.5 2000/01/11 12:59:45 pk Exp $  */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -174,12 +174,6 @@
                return;
        }
 
-       if (oba->oba_bp != NULL && strcmp(oba->oba_bp->name, "esp") == 0 &&
-           oba->oba_bp->val[0] == -1 &&
-           oba->oba_bp->val[1] == sc->sc_dev.dv_unit)
-               bootpath_store(1, oba->oba_bp + 1);
-
-
        /*
         * Set up glue for MI code early; we use some of it here.
         */
@@ -281,8 +275,6 @@
 
        /* Turn on target selection using the `dma' method */
        ncr53c9x_dmaselect = 1;
-
-       bootpath_store(1, NULL);
 }
 
 /*
diff -r 193fad48e5d4 -r 4bfeb37c313b sys/arch/sparc/dev/fd.c
--- a/sys/arch/sparc/dev/fd.c   Tue Jan 11 10:53:01 2000 +0000
+++ b/sys/arch/sparc/dev/fd.c   Tue Jan 11 12:59:43 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fd.c,v 1.68 1999/11/21 15:23:01 pk Exp $       */
+/*     $NetBSD: fd.c,v 1.69 2000/01/11 12:59:45 pk Exp $       */
 
 /*-
  * Copyright (c) 1993, 1994, 1995 Charles M. Hannum.
@@ -145,7 +145,7 @@
 void   fdcattach_mainbus __P((struct device *, struct device *, void *));
 void   fdcattach_obio __P((struct device *, struct device *, void *));
 
-void   fdcattach __P((struct fdc_softc *, int, struct bootpath *));
+void   fdcattach __P((struct fdc_softc *, int));
 
 struct cfattach fdc_mainbus_ca = {
        sizeof(struct fdc_softc), fdcmatch_mainbus, fdcattach_mainbus
@@ -339,7 +339,6 @@
  */
 struct fdc_attach_args {
        int fa_drive;
-       struct bootpath *fa_bootpath;
        struct fd_type *fa_deftype;
 };
 
@@ -398,7 +397,6 @@
 {
        struct fdc_softc *fdc = (void *)self;
        struct mainbus_attach_args *ma = aux;
-       struct bootpath *bp;
 
        fdc->sc_bustag = ma->ma_bustag;
 
@@ -420,24 +418,7 @@
                fdc->sc_reg = (caddr_t)bh;
        }
 
-       bp = NULL;
-       if (ma->ma_bp != NULL && strcmp(ma->ma_bp->name, OBP_FDNAME) == 0) {
-               int v0 = ma->ma_bp->val[0];
-               int v1 = ma->ma_bp->val[1];
-               /*
-                * We can get the bootpath in several different
-                * formats! The faked v1 bootpath looks like /fd@0,0.
-                * The v2 bootpath is either just /fd0, in which case
-                * `bp->val[0]' will have been set to -1, or /fd@x,y
-                * where <x,y> is the prom address specifier.
-                */
-               if (((v0 == ma->ma_iospace) && (v1 == (int)ma->ma_paddr)) ||
-                   ((v0 == -1) && (v1 == 0)) ||        /* v2: /fd0 */
-                   ((v0 == 0) && (v1 == 0))            /* v1: /fd@0,0 */ )
-                       bp = ma->ma_bp;
-       }
-
-       fdcattach(fdc, ma->ma_pri, bp);
+       fdcattach(fdc, ma->ma_pri);
 }
 
 void
@@ -448,7 +429,6 @@
        struct fdc_softc *fdc = (void *)self;
        union obio_attach_args *uoba = aux;
        struct sbus_attach_args *sa = &uoba->uoba_sbus;
-       struct bootpath *bp;
 
        fdc->sc_bustag = sa->sa_bustag;
 
@@ -470,29 +450,14 @@
                fdc->sc_reg = (caddr_t)bh;
        }
 
-       bp = NULL;
-       if (sa->sa_bp != NULL && strcmp(sa->sa_bp->name, OBP_FDNAME) == 0) {
-               int v0 = sa->sa_bp->val[0];
-               int v1 = sa->sa_bp->val[1];
-               /*
-                * floppy controller on obio (such as on the sun4m),
-                * e.g.: `/obio0/SUNW,fdtwo@0,700000'.
-                * We use "slot, offset" to determine if this is the
-                * right one.
-                */
-               if ((v0 != sa->sa_slot) || (v1 != sa->sa_offset))
-                       bp = sa->sa_bp;
-       }
-
        if (sa->sa_nintr != 0)
-               fdcattach(fdc, sa->sa_pri, bp);
+               fdcattach(fdc, sa->sa_pri);
 }
 
 void
-fdcattach(fdc, pri, bp)
+fdcattach(fdc, pri)
        struct fdc_softc *fdc;
        int pri;
-       struct bootpath *bp;
 {
        struct fdc_attach_args fa;
        char code;
@@ -566,16 +531,12 @@
 
        printf(" softpri %d: chip 8207%c\n", PIL_FDSOFT, code);
 
-       fa.fa_bootpath = bp;
-
        /* physical limit: four drives per controller. */
        for (fa.fa_drive = 0; fa.fa_drive < 4; fa.fa_drive++) {
                fa.fa_deftype = NULL;           /* unknown */
        fa.fa_deftype = &fd_types[0];           /* XXX */
                (void)config_found(&fdc->sc_dev, (void *)&fa, fdprint);
        }
-
-       bootpath_store(1, NULL);
 }
 
 int
@@ -684,12 +645,6 @@
        disk_attach(&fd->sc_dk);
 
        /*
-        * We're told if we're the boot device in fdcattach().
-        */
-       if (fa->fa_bootpath)
-               fa->fa_bootpath->dev = &fd->sc_dv;
-
-       /*
         * Establish a mountroot_hook anyway in case we booted
         * with RB_ASKNAME and get selected as the boot device.
         */
diff -r 193fad48e5d4 -r 4bfeb37c313b sys/arch/sparc/dev/if_ie_obio.c
--- a/sys/arch/sparc/dev/if_ie_obio.c   Tue Jan 11 10:53:01 2000 +0000
+++ b/sys/arch/sparc/dev/if_ie_obio.c   Tue Jan 11 12:59:43 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ie_obio.c,v 1.12 1999/11/13 00:32:12 thorpej Exp $  */
+/*     $NetBSD: if_ie_obio.c,v 1.13 2000/01/11 12:59:46 pk Exp $       */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -282,7 +282,6 @@
        bus_space_handle_t bh;
        bus_dma_segment_t seg;
        int rseg;
-       struct bootpath *bp;
        paddr_t pa;
        struct intrhand *ih;
        u_long iebase;
@@ -410,9 +409,4 @@
        ih = bus_intr_establish(oba->oba_bustag,
                                oba->oba_pri, 0,
                                i82586_intr, sc);
-
-       bp = oba->oba_bp;
-       if (bp != NULL && strcmp(bp->name, "ie") == 0 &&
-           sc->sc_dev.dv_unit == bp->val[1])
-               bp->dev = &sc->sc_dev;
 }
diff -r 193fad48e5d4 -r 4bfeb37c313b sys/arch/sparc/dev/if_le_obio.c
--- a/sys/arch/sparc/dev/if_le_obio.c   Tue Jan 11 10:53:01 2000 +0000
+++ b/sys/arch/sparc/dev/if_le_obio.c   Tue Jan 11 12:59:43 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_le_obio.c,v 1.5 1998/08/29 20:49:37 pk Exp $        */
+/*     $NetBSD: if_le_obio.c,v 1.6 2000/01/11 12:59:46 pk Exp $        */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -172,12 +172,6 @@
                return;
        }
 
-       if (oba->oba_bp != NULL &&
-           strcmp(oba->oba_bp->name, le_cd.cd_name) == 0 &&
-           sc->sc_dev.dv_unit == oba->oba_bp->val[1])
-               oba->oba_bp->dev = &sc->sc_dev;
-
-
        if (bus_dmamem_alloc(lesc->sc_dmatag, MEMSIZE, NBPG, 0,
                             &seg, 1, &rseg,
                             BUS_DMA_NOWAIT | BUS_DMA_24BIT) != 0) {
diff -r 193fad48e5d4 -r 4bfeb37c313b sys/arch/sparc/dev/obio.c
--- a/sys/arch/sparc/dev/obio.c Tue Jan 11 10:53:01 2000 +0000
+++ b/sys/arch/sparc/dev/obio.c Tue Jan 11 12:59:43 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: obio.c,v 1.46 1999/06/28 22:40:15 pk Exp $     */
+/*     $NetBSD: obio.c,v 1.47 2000/01/11 12:59:46 pk Exp $     */
 
 /*-
  * Copyright (c) 1997,1998 The NetBSD Foundation, Inc.
@@ -202,7 +202,7 @@
                sc->sc_dmatag = ma->ma_dmatag;
                sc->sc_intr2ipl = intr_obio2ipl;
 
-               sbus_attach_common(sc, "obio", ma->ma_node, ma->ma_bp, special4m);
+               sbus_attach_common(sc, "obio", ma->ma_node, special4m);
        } else {
                printf("obio on this machine?\n");
        }
@@ -266,7 +266,6 @@
        struct obio4_busattachargs *oap = aux;
        union obio_attach_args uoba;
        struct obio4_attach_args *oba = &uoba.uoba_oba4;
-       struct bootpath *bp;
 
        /* Check whether we're looking for a specifically named device */
        if (oap->name != NULL && strcmp(oap->name, cf->cf_driver->cd_name) != 0)
@@ -297,12 +296,6 @@
        oba->oba_paddr = cf->cf_loc[0];
        oba->oba_pri = cf->cf_loc[1];
 
-       bp = oap->ma->ma_bp;
-       if (bp != NULL && strcmp(bp->name, "obio") == 0)
-               oba->oba_bp = bp + 1;
-       else
-               oba->oba_bp = NULL;
-
        if ((*cf->cf_attach->ca_match)(parent, cf, &uoba) == 0)
                return (0);
 
diff -r 193fad48e5d4 -r 4bfeb37c313b sys/arch/sparc/dev/sbus.c
--- a/sys/arch/sparc/dev/sbus.c Tue Jan 11 10:53:01 2000 +0000
+++ b/sys/arch/sparc/dev/sbus.c Tue Jan 11 12:59:43 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sbus.c,v 1.35 1999/04/14 09:50:01 pk Exp $ */
+/*     $NetBSD: sbus.c,v 1.36 2000/01/11 12:59:46 pk Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -311,7 +311,7 @@
        printf(": clock = %s MHz\n", clockfreq(sc->sc_clockfreq));
 
        sbus_sc = sc;
-       sbus_attach_common(sc, "sbus", node, ma->ma_bp, NULL);
+       sbus_attach_common(sc, "sbus", node, NULL);
 }
 
 
@@ -352,7 +352,7 @@
 
        sbus_sc = sc;
        sbuserr_handler = sbus_error;
-       sbus_attach_common(sc, "sbus", node, ia->iom_bp, NULL);
+       sbus_attach_common(sc, "sbus", node, NULL);
 }
 
 void
@@ -378,15 +378,14 @@
        sc->sc_clockfreq = getpropint(node, "clock-frequency", 25*1000*1000);
        printf(": clock = %s MHz\n", clockfreq(sc->sc_clockfreq));
 
-       sbus_attach_common(sc, "sbus", node, xa->xa_bp, NULL);
+       sbus_attach_common(sc, "sbus", node, NULL);
 }
 
 void
-sbus_attach_common(sc, busname, busnode, bp, specials)
+sbus_attach_common(sc, busname, busnode, specials)
        struct sbus_softc *sc;
        char *busname;
        int busnode;
-       struct bootpath *bp;
        const char * const *specials;
 {
        int node0, node, error;
@@ -413,12 +412,6 @@
                sc->sc_burst &= ~SBUS_BURST_64;
        }
 
-       /* Propagate bootpath */
-       if (bp != NULL && strcmp(bp->name, busname) == 0)



Home | Main Index | Thread Index | Old Index