diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-06-02 20:00:57 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-06-02 20:00:57 +0000 |
commit | 8a2c47dc693f0b7d7c87cfab91e1dccefe733901 (patch) | |
tree | d26ab554038c5021bf138a9258249f28a85908b5 /sys | |
parent | d9686ca22229b75ee9f8fcd3b7aba51956453f73 (diff) |
sbus_establish() and the associated linked list in the sbus softc is now only
used to store a per-device reset callback, for use in sbusreset(). Except
sbusreset() has never, ever, been used since Torek's sbus code went in.
Time to recycle those wasted bits.
Diffstat (limited to 'sys')
73 files changed, 73 insertions, 399 deletions
diff --git a/sys/arch/sparc/dev/agten.c b/sys/arch/sparc/dev/agten.c index 955d4df2420..f8127c35dfb 100644 --- a/sys/arch/sparc/dev/agten.c +++ b/sys/arch/sparc/dev/agten.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agten.c,v 1.9 2005/03/23 17:16:34 miod Exp $ */ +/* $OpenBSD: agten.c,v 1.10 2006/06/02 20:00:54 miod Exp $ */ /* * Copyright (c) 2002, 2003, Miodrag Vallat. * All rights reserved. @@ -91,7 +91,6 @@ struct agten_cmap { /* per-display variables */ struct agten_softc { struct sunfb sc_sunfb; /* common base part */ - struct sbusdev sc_sd; /* sbus device */ struct rom_reg sc_phys; /* physical address and */ off_t sc_physoffset; /* offset for frame buffer */ @@ -212,8 +211,6 @@ agtenattach(struct device *parent, struct device *self, void *args) fbwscons_console_init(&sc->sc_sunfb, -1); } - sbus_establish(&sc->sc_sd, &sc->sc_sunfb.sf_dev); - fbwscons_attach(&sc->sc_sunfb, &agten_accessops, isconsole); } diff --git a/sys/arch/sparc/dev/bevar.h b/sys/arch/sparc/dev/bevar.h index 57db9ed6235..e12e244f290 100644 --- a/sys/arch/sparc/dev/bevar.h +++ b/sys/arch/sparc/dev/bevar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bevar.h,v 1.13 2003/06/02 18:40:59 jason Exp $ */ +/* $OpenBSD: bevar.h,v 1.14 2006/06/02 20:00:54 miod Exp $ */ /* * Copyright (c) 1998 Theo de Raadt and Jason L. Wright. @@ -27,7 +27,6 @@ struct besoftc { struct device sc_dev; - struct sbusdev sc_sd; /* sbus device */ struct intrhand sc_ih; /* interrupt vectoring */ struct arpcom sc_arpcom; /* ethernet common */ struct ifmedia sc_ifmedia; /* interface media */ diff --git a/sys/arch/sparc/dev/bwtwo.c b/sys/arch/sparc/dev/bwtwo.c index 3f137ed8746..06c687f8dc5 100644 --- a/sys/arch/sparc/dev/bwtwo.c +++ b/sys/arch/sparc/dev/bwtwo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bwtwo.c,v 1.32 2005/03/23 17:16:34 miod Exp $ */ +/* $OpenBSD: bwtwo.c,v 1.33 2006/06/02 20:00:54 miod Exp $ */ /* $NetBSD: bwtwo.c,v 1.33 1997/05/24 20:16:02 pk Exp $ */ /* @@ -84,7 +84,6 @@ /* per-display variables */ struct bwtwo_softc { struct sunfb sc_sunfb; /* common base part */ - struct sbusdev sc_sd; /* sbus device */ volatile struct fbcontrol *sc_reg;/* control registers */ struct rom_reg sc_phys; /* phys address description */ int sc_bustype; /* type of bus we live on */ @@ -282,11 +281,6 @@ obp_name: fbwscons_console_init(&sc->sc_sunfb, -1); } -#if defined(SUN4C) || defined(SUN4M) - if (sbus) - sbus_establish(&sc->sc_sd, &sc->sc_sunfb.sf_dev); -#endif - fbwscons_attach(&sc->sc_sunfb, &bwtwo_accessops, isconsole); } diff --git a/sys/arch/sparc/dev/cgsix.c b/sys/arch/sparc/dev/cgsix.c index 9c1fcde54da..0243ee3b05c 100644 --- a/sys/arch/sparc/dev/cgsix.c +++ b/sys/arch/sparc/dev/cgsix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cgsix.c,v 1.33 2005/03/23 17:16:34 miod Exp $ */ +/* $OpenBSD: cgsix.c,v 1.34 2006/06/02 20:00:54 miod Exp $ */ /* $NetBSD: cgsix.c,v 1.33 1997/08/07 19:12:30 pk Exp $ */ /* @@ -111,7 +111,6 @@ /* per-display variables */ struct cgsix_softc { struct sunfb sc_sunfb; /* common base part */ - struct sbusdev sc_sd; /* sbus device */ struct rom_reg sc_phys; /* phys addr of h/w */ volatile struct bt_regs *sc_bt; /* Brooktree registers */ volatile int *sc_fhc; /* FHC register */ @@ -347,11 +346,6 @@ cgsixattach(struct device *parent, struct device *self, void *args) sc->sc_sunfb.sf_width >= 1024 ? -1 : 0); } -#if defined(SUN4C) || defined(SUN4M) - if (sbus) - sbus_establish(&sc->sc_sd, &sc->sc_sunfb.sf_dev); -#endif - fbwscons_attach(&sc->sc_sunfb, &cgsix_accessops, isconsole); } diff --git a/sys/arch/sparc/dev/cgthree.c b/sys/arch/sparc/dev/cgthree.c index e14ce681908..225eba75afd 100644 --- a/sys/arch/sparc/dev/cgthree.c +++ b/sys/arch/sparc/dev/cgthree.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cgthree.c,v 1.29 2005/03/23 17:16:34 miod Exp $ */ +/* $OpenBSD: cgthree.c,v 1.30 2006/06/02 20:00:54 miod Exp $ */ /* $NetBSD: cgthree.c,v 1.33 1997/05/24 20:16:11 pk Exp $ */ /* @@ -107,7 +107,6 @@ /* per-display variables */ struct cgthree_softc { struct sunfb sc_sunfb; /* common base part */ - struct sbusdev sc_sd; /* sbus device */ struct rom_reg sc_phys; /* phys address description */ volatile struct fbcontrol *sc_fbc; /* Brooktree registers */ union bt_cmap sc_cmap; /* Brooktree color map */ @@ -298,11 +297,6 @@ cgthreeattach(struct device *parent, struct device *self, void *args) sc->sc_sunfb.sf_width >= 1024 ? -1 : 0); } -#if defined(SUN4C) || defined(SUN4M) - if (sbus) - sbus_establish(&sc->sc_sd, &sc->sc_sunfb.sf_dev); -#endif - fbwscons_attach(&sc->sc_sunfb, &cgthree_accessops, isconsole); } diff --git a/sys/arch/sparc/dev/cgtwelve.c b/sys/arch/sparc/dev/cgtwelve.c index c641d3cc80b..070877e0d0d 100644 --- a/sys/arch/sparc/dev/cgtwelve.c +++ b/sys/arch/sparc/dev/cgtwelve.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cgtwelve.c,v 1.14 2005/03/23 17:16:34 miod Exp $ */ +/* $OpenBSD: cgtwelve.c,v 1.15 2006/06/02 20:00:54 miod Exp $ */ /* * Copyright (c) 2002, 2003 Miodrag Vallat. All rights reserved. @@ -76,7 +76,6 @@ /* per-display variables */ struct cgtwelve_softc { struct sunfb sc_sunfb; /* common base device */ - struct sbusdev sc_sd; /* sbus device */ struct rom_reg sc_phys; volatile struct cgtwelve_dpu *sc_dpu; @@ -202,8 +201,6 @@ cgtwelveattach(struct device *parent, struct device *self, void *args) shutdownhook_establish(cgtwelve_prom, sc); } - sbus_establish(&sc->sc_sd, &sc->sc_sunfb.sf_dev); - printf("%s: %dx%d", self->dv_xname, sc->sc_sunfb.sf_width, sc->sc_sunfb.sf_height); ps = getpropstring(node, "ucoderev"); diff --git a/sys/arch/sparc/dev/cs4231.c b/sys/arch/sparc/dev/cs4231.c index b2a91315081..b0625b9d6bd 100644 --- a/sys/arch/sparc/dev/cs4231.c +++ b/sys/arch/sparc/dev/cs4231.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cs4231.c,v 1.25 2005/07/17 10:40:50 miod Exp $ */ +/* $OpenBSD: cs4231.c,v 1.26 2006/06/02 20:00:54 miod Exp $ */ /* * Copyright (c) 1999 Jason L. Wright (jason@thought.net) @@ -233,8 +233,6 @@ cs4231_attach(parent, self, aux) /* Clamp at parent's burst sizes */ sc->sc_burst &= ((struct sbus_softc *)parent)->sc_burst; - sbus_establish(&sc->sc_sd, &sc->sc_dev); - sc->sc_ih.ih_fun = cs4231_intr; sc->sc_ih.ih_arg = sc; intr_establish(ca->ca_ra.ra_intr[0].int_pri, &sc->sc_ih, IPL_AUHARD, diff --git a/sys/arch/sparc/dev/cs4231var.h b/sys/arch/sparc/dev/cs4231var.h index c304974dad4..a725c510375 100644 --- a/sys/arch/sparc/dev/cs4231var.h +++ b/sys/arch/sparc/dev/cs4231var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cs4231var.h,v 1.9 2004/09/29 07:35:11 miod Exp $ */ +/* $OpenBSD: cs4231var.h,v 1.10 2006/06/02 20:00:54 miod Exp $ */ /* * Copyright (c) 1999 Jason L. Wright (jason@thought.net) @@ -57,7 +57,6 @@ struct cs_channel { struct cs4231_softc { struct device sc_dev; /* base device */ - struct sbusdev sc_sd; /* sbus device */ struct intrhand sc_ih; /* hardware interrupt vectoring */ struct cs4231_regs *sc_regs; /* CS4231/APC registers */ int sc_node; /* which sbus node */ diff --git a/sys/arch/sparc/dev/dma.c b/sys/arch/sparc/dev/dma.c index 18b45f116ef..0425dc025ed 100644 --- a/sys/arch/sparc/dev/dma.c +++ b/sys/arch/sparc/dev/dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dma.c,v 1.21 2005/03/02 16:42:37 miod Exp $ */ +/* $OpenBSD: dma.c,v 1.22 2006/06/02 20:00:54 miod Exp $ */ /* $NetBSD: dma.c,v 1.46 1997/08/27 11:24:16 bouyer Exp $ */ /* @@ -217,9 +217,6 @@ dmaattach(parent, self, aux) goto espsearch; #if defined(SUN4C) || defined(SUN4M) - if (ca->ca_bustype == BUS_SBUS) - sbus_establish(&sc->sc_sd, &sc->sc_dev); - /* Propagate bootpath */ if (ca->ca_ra.ra_bp != NULL && (strcmp(ca->ca_ra.ra_bp->name, "espdma") == 0 || diff --git a/sys/arch/sparc/dev/dmavar.h b/sys/arch/sparc/dev/dmavar.h index b86cf79d1c3..7056b5ae908 100644 --- a/sys/arch/sparc/dev/dmavar.h +++ b/sys/arch/sparc/dev/dmavar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dmavar.h,v 1.6 2005/03/02 16:42:37 miod Exp $ */ +/* $OpenBSD: dmavar.h,v 1.7 2006/06/02 20:00:54 miod Exp $ */ /* $NetBSD: dmavar.h,v 1.11 1996/11/27 21:49:53 pk Exp $ */ /* @@ -26,7 +26,6 @@ struct dma_softc { struct device sc_dev; /* us as a device */ - struct sbusdev sc_sd; /* sbus device */ struct esp_softc *sc_esp; /* my scsi */ struct le_softc *sc_le; /* my ethernet */ struct dma_regs *sc_regs; /* the registers */ diff --git a/sys/arch/sparc/dev/esp.c b/sys/arch/sparc/dev/esp.c index 520b3e90e43..cb6f92e13bf 100644 --- a/sys/arch/sparc/dev/esp.c +++ b/sys/arch/sparc/dev/esp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: esp.c,v 1.23 2005/03/02 16:42:37 miod Exp $ */ +/* $OpenBSD: esp.c,v 1.24 2006/06/02 20:00:54 miod Exp $ */ /* $NetBSD: esp.c,v 1.69 1997/08/27 11:24:18 bouyer Exp $ */ /* @@ -482,17 +482,6 @@ espattach(parent, self, aux) break; } - /* add me to the sbus structures */ - esc->sc_sd.sd_reset = (void *) ncr53c9x_reset; -#if defined(SUN4C) || defined(SUN4M) - if (ca->ca_bustype == BUS_SBUS) { - if (dmachild) - sbus_establish(&esc->sc_sd, sc->sc_dev.dv_parent); - else - sbus_establish(&esc->sc_sd, &sc->sc_dev); - } -#endif /* SUN4C || SUN4M */ - /* and the interrupts */ esc->sc_ih.ih_fun = (void *) ncr53c9x_intr; esc->sc_ih.ih_arg = sc; diff --git a/sys/arch/sparc/dev/espvar.h b/sys/arch/sparc/dev/espvar.h index 32f81278479..74d1ae574b0 100644 --- a/sys/arch/sparc/dev/espvar.h +++ b/sys/arch/sparc/dev/espvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: espvar.h,v 1.5 1997/08/08 08:25:02 downsj Exp $ */ +/* $OpenBSD: espvar.h,v 1.6 2006/06/02 20:00:54 miod Exp $ */ /* $NetBSD: espvar.h,v 1.19 1997/02/27 01:16:21 thorpej Exp $ */ /* @@ -35,7 +35,6 @@ struct esp_softc { struct ncr53c9x_softc sc_ncr53c9x; /* glue to MI code */ - struct sbusdev sc_sd; /* sbus device */ struct intrhand sc_ih; /* intr handler */ volatile u_char *sc_reg; /* the registers */ diff --git a/sys/arch/sparc/dev/hme.c b/sys/arch/sparc/dev/hme.c index 559f66e6c50..79f39af05d1 100644 --- a/sys/arch/sparc/dev/hme.c +++ b/sys/arch/sparc/dev/hme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hme.c,v 1.53 2006/05/27 23:59:07 jason Exp $ */ +/* $OpenBSD: hme.c,v 1.54 2006/06/02 20:00:54 miod Exp $ */ /* * Copyright (c) 1998 Jason L. Wright (jason@thought.net) @@ -208,8 +208,6 @@ hmeattach(parent, self, aux) hme_meminit(sc); - sbus_establish(&sc->sc_sd, &sc->sc_dev); - sc->sc_ih.ih_fun = hmeintr; sc->sc_ih.ih_arg = sc; intr_establish(ca->ca_ra.ra_intr[0].int_pri, &sc->sc_ih, IPL_NET, diff --git a/sys/arch/sparc/dev/hmevar.h b/sys/arch/sparc/dev/hmevar.h index 9b39ebfbf5d..8dfbfe4ea26 100644 --- a/sys/arch/sparc/dev/hmevar.h +++ b/sys/arch/sparc/dev/hmevar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: hmevar.h,v 1.11 2004/09/28 00:21:23 brad Exp $ */ +/* $OpenBSD: hmevar.h,v 1.12 2006/06/02 20:00:54 miod Exp $ */ /* * Copyright (c) 1998 Jason L. Wright (jason@thought.net) @@ -28,7 +28,6 @@ struct hme_softc { struct device sc_dev; /* base device */ - struct sbusdev sc_sd; /* sbus device */ struct intrhand sc_ih; /* interrupt vectoring */ int sc_node; /* which sbus node */ diff --git a/sys/arch/sparc/dev/if_en_sbus.c b/sys/arch/sparc/dev/if_en_sbus.c index ff6a417b961..0ce881364d0 100644 --- a/sys/arch/sparc/dev/if_en_sbus.c +++ b/sys/arch/sparc/dev/if_en_sbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_en_sbus.c,v 1.6 2004/09/29 07:35:11 miod Exp $ */ +/* $OpenBSD: if_en_sbus.c,v 1.7 2006/06/02 20:00:54 miod Exp $ */ /* $NetBSD: if_en_sbus.c,v 1.4 1997/05/24 20:16:22 pk Exp $ */ /* @@ -70,7 +70,6 @@ struct en_sbus_softc { struct en_softc esc; /* includes "device" structure */ /* sbus glue */ - struct sbusdev sc_sd; /* sbus device */ struct intrhand sc_ih; /* interrupt vectoring */ }; diff --git a/sys/arch/sparc/dev/if_le.c b/sys/arch/sparc/dev/if_le.c index 87fcce9b9b1..47cd4d2aa54 100644 --- a/sys/arch/sparc/dev/if_le.c +++ b/sys/arch/sparc/dev/if_le.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_le.c,v 1.27 2006/06/02 19:58:32 miod Exp $ */ +/* $OpenBSD: if_le.c,v 1.28 2006/06/02 20:00:54 miod Exp $ */ /* $NetBSD: if_le.c,v 1.50 1997/09/09 20:54:48 pk Exp $ */ /*- @@ -550,14 +550,6 @@ leattach(parent, self, aux) (bp->val[0] == -1 && bp->val[1] == sc->sc_dev.dv_unit)) case BUS_SBUS: - lesc->sc_sd.sd_reset = (void *)am7990_reset; - if (sbuschild) { - sbus_establish(&lesc->sc_sd, &sc->sc_dev); - } else { - /* Assume SBus is grandparent */ - sbus_establish(&lesc->sc_sd, parent); - } - if (bp != NULL && strcmp(bp->name, le_cd.cd_name) == 0 && SAME_LANCE(bp, ca)) bp->dev = &sc->sc_dev; diff --git a/sys/arch/sparc/dev/if_levar.h b/sys/arch/sparc/dev/if_levar.h index 29845e08650..13fbe3668bd 100644 --- a/sys/arch/sparc/dev/if_levar.h +++ b/sys/arch/sparc/dev/if_levar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_levar.h,v 1.5 2003/06/02 23:27:54 millert Exp $ */ +/* $OpenBSD: if_levar.h,v 1.6 2006/06/02 20:00:54 miod Exp $ */ /* $NetBSD: if_levar.h,v 1.7 1997/04/04 20:29:23 pk Exp $ */ /*- @@ -46,7 +46,6 @@ struct le_softc { struct am7990_softc sc_am7990; /* glue to MI code */ - struct sbusdev sc_sd; /* sbus device */ struct intrhand sc_ih; /* interrupt vectoring */ struct lereg1 *sc_r1; /* LANCE registers */ struct dma_softc *sc_dma; /* pointer to my dma */ diff --git a/sys/arch/sparc/dev/lebuffer.c b/sys/arch/sparc/dev/lebuffer.c index fbc3c8d6c32..2f3d40b5131 100644 --- a/sys/arch/sparc/dev/lebuffer.c +++ b/sys/arch/sparc/dev/lebuffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lebuffer.c,v 1.5 2002/03/14 01:26:43 millert Exp $ */ +/* $OpenBSD: lebuffer.c,v 1.6 2006/06/02 20:00:54 miod Exp $ */ /* $NetBSD: lebuffer.c,v 1.3 1997/05/24 20:16:28 pk Exp $ */ /* @@ -142,9 +142,6 @@ lebufattach(parent, self, aux) node = sc->sc_node = ca->ca_ra.ra_node; - if (ca->ca_bustype == BUS_SBUS) - sbus_establish(&sc->sc_sd, &sc->sc_dev); - /* Propagate bootpath */ if (ca->ca_ra.ra_bp != NULL) oca.ca_ra.ra_bp = ca->ca_ra.ra_bp + 1; diff --git a/sys/arch/sparc/dev/lebuffervar.h b/sys/arch/sparc/dev/lebuffervar.h index edd47c7b8e9..5d08206443f 100644 --- a/sys/arch/sparc/dev/lebuffervar.h +++ b/sys/arch/sparc/dev/lebuffervar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: lebuffervar.h,v 1.1 1997/08/08 08:25:18 downsj Exp $ */ +/* $OpenBSD: lebuffervar.h,v 1.2 2006/06/02 20:00:54 miod Exp $ */ /* $NetBSD: lebuffervar.h,v 1.2 1997/03/10 22:56:54 pk Exp $ */ /* @@ -31,7 +31,6 @@ struct lebuf_softc { struct device sc_dev; /* us as a device */ - struct sbusdev sc_sd; /* sbus device */ u_int sc_rev; /* revision */ int sc_node; /* PROM node ID */ int sc_burst; /* DVMA burst size in effect */ diff --git a/sys/arch/sparc/dev/mgx.c b/sys/arch/sparc/dev/mgx.c index 0ef96cbbb68..aeceee65210 100644 --- a/sys/arch/sparc/dev/mgx.c +++ b/sys/arch/sparc/dev/mgx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mgx.c,v 1.10 2005/03/23 17:16:34 miod Exp $ */ +/* $OpenBSD: mgx.c,v 1.11 2006/06/02 20:00:54 miod Exp $ */ /* * Copyright (c) 2003, Miodrag Vallat. * All rights reserved. @@ -80,7 +80,6 @@ /* per-display variables */ struct mgx_softc { struct sunfb sc_sunfb; /* common base device */ - struct sbusdev sc_sd; /* sbus device */ struct rom_reg sc_phys; u_int8_t sc_cmap[256 * 3]; /* shadow colormap */ volatile u_int8_t *sc_vidc; /* ramdac registers */ @@ -195,8 +194,6 @@ mgxattach(struct device *parent, struct device *self, void *args) fbwscons_console_init(&sc->sc_sunfb, -1); } - sbus_establish(&sc->sc_sd, &sc->sc_sunfb.sf_dev); - fbwscons_attach(&sc->sc_sunfb, &mgx_accessops, isconsole); } diff --git a/sys/arch/sparc/dev/p9000.c b/sys/arch/sparc/dev/p9000.c index 1878ae5137b..4dcf1581044 100644 --- a/sys/arch/sparc/dev/p9000.c +++ b/sys/arch/sparc/dev/p9000.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p9000.c,v 1.15 2005/07/09 22:22:12 miod Exp $ */ +/* $OpenBSD: p9000.c,v 1.16 2006/06/02 20:00:54 miod Exp $ */ /* * Copyright (c) 2003, Miodrag Vallat. @@ -68,7 +68,6 @@ /* per-display variables */ struct p9000_softc { struct sunfb sc_sunfb; /* common base part */ - struct sbusdev sc_sd; /* sbus device */ struct rom_reg sc_phys; /* phys address description */ volatile u_int8_t *sc_cmd; /* command registers (dac, etc) */ volatile u_int8_t *sc_ctl; /* control registers (draw engine) */ @@ -264,8 +263,6 @@ p9000attach(struct device *parent, struct device *self, void *args) */ p9000_ras_init(sc); - sbus_establish(&sc->sc_sd, &sc->sc_sunfb.sf_dev); - /* enable video */ p9000_burner(sc, 1, 0); diff --git a/sys/arch/sparc/dev/p9100.c b/sys/arch/sparc/dev/p9100.c index de538f86bc7..46de9ea3865 100644 --- a/sys/arch/sparc/dev/p9100.c +++ b/sys/arch/sparc/dev/p9100.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p9100.c,v 1.38 2005/07/19 09:36:04 miod Exp $ */ +/* $OpenBSD: p9100.c,v 1.39 2006/06/02 20:00:54 miod Exp $ */ /* * Copyright (c) 2003, 2005, Miodrag Vallat. @@ -81,7 +81,6 @@ /* per-display variables */ struct p9100_softc { struct sunfb sc_sunfb; /* common base part */ - struct sbusdev sc_sd; /* sbus device */ struct rom_reg sc_phys; volatile u_int8_t *sc_cmd; /* command registers (dac, etc) */ volatile u_int8_t *sc_ctl; /* control registers (draw engine) */ @@ -337,8 +336,6 @@ p9100attach(struct device *parent, struct device *self, void *args) if (sc->sc_sunfb.sf_depth == 8) p9100_ras_init(sc); - sbus_establish(&sc->sc_sd, &sc->sc_sunfb.sf_dev); - /* enable video */ p9100_burner(sc, 1, 0); diff --git a/sys/arch/sparc/dev/presto.c b/sys/arch/sparc/dev/presto.c index aa30807a8f9..007db1a6503 100644 --- a/sys/arch/sparc/dev/presto.c +++ b/sys/arch/sparc/dev/presto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: presto.c,v 1.2 2003/05/26 18:16:27 tedu Exp $ */ +/* $OpenBSD: presto.c,v 1.3 2006/06/02 20:00:54 miod Exp $ */ /* * Copyright (c) 2003, Miodrag Vallat. * All rights reserved. @@ -45,7 +45,6 @@ struct presto_softc { struct device sc_dev; - struct sbusdev sc_sd; struct disk sc_dk; vsize_t sc_memsize; /* total NVRAM size */ @@ -165,8 +164,6 @@ presto_attach(struct device *parent, struct device *self, void *args) *(u_int8_t *)(sc->sc_mem + 0x0b), *(u_int8_t *)(sc->sc_mem + 0x0f)); #endif - sbus_establish(&sc->sc_sd, &sc->sc_dev); - sc->sc_dk.dk_driver = &presto_dk; sc->sc_dk.dk_name = sc->sc_dev.dv_xname; disk_attach(&sc->sc_dk); diff --git a/sys/arch/sparc/dev/qec.c b/sys/arch/sparc/dev/qec.c index c97b2f08498..6ea0d664e6c 100644 --- a/sys/arch/sparc/dev/qec.c +++ b/sys/arch/sparc/dev/qec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qec.c,v 1.16 2003/06/02 15:54:22 deraadt Exp $ */ +/* $OpenBSD: qec.c,v 1.17 2006/06/02 20:00:54 miod Exp $ */ /* * Copyright (c) 1998 Theo de Raadt and Jason L. Wright. @@ -177,9 +177,6 @@ qecattach(parent, self, aux) node = sc->sc_node = ca->ca_ra.ra_node; - if (ca->ca_bustype == BUS_SBUS) - sbus_establish(&sc->sc_sd, &sc->sc_dev); - /* Propagate bootpath */ if (ca->ca_ra.ra_bp != NULL) oca.ca_ra.ra_bp = ca->ca_ra.ra_bp + 1; diff --git a/sys/arch/sparc/dev/qecvar.h b/sys/arch/sparc/dev/qecvar.h index 6030dce83e5..8c9e0f737f1 100644 --- a/sys/arch/sparc/dev/qecvar.h +++ b/sys/arch/sparc/dev/qecvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: qecvar.h,v 1.10 2003/06/02 15:54:22 deraadt Exp $ */ +/* $OpenBSD: qecvar.h,v 1.11 2006/06/02 20:00:54 miod Exp $ */ /* * Copyright (c) 1998 Theo de Raadt and Jason L. Wright. @@ -27,7 +27,6 @@ struct qec_softc { struct device sc_dev; /* us as a device */ - struct sbusdev sc_sd; /* sbus device */ struct qecregs *sc_regs; /* QEC registers */ int sc_node; /* PROM node ID */ int sc_burst; /* DVMA burst size in effect */ diff --git a/sys/arch/sparc/dev/qevar.h b/sys/arch/sparc/dev/qevar.h index 2d4966e2569..0408e5bddf0 100644 --- a/sys/arch/sparc/dev/qevar.h +++ b/sys/arch/sparc/dev/qevar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: qevar.h,v 1.5 2003/06/02 18:40:59 jason Exp $ */ +/* $OpenBSD: qevar.h,v 1.6 2006/06/02 20:00:54 miod Exp $ */ /* * Copyright (c) 1998, 2000 Jason L. Wright. @@ -27,7 +27,6 @@ struct qesoftc { struct device sc_dev; - struct sbusdev sc_sd; /* sbus device */ struct intrhand sc_ih; /* interrupt vectoring */ struct arpcom sc_arpcom; /* ethernet common */ diff --git a/sys/arch/sparc/dev/rfx.c b/sys/arch/sparc/dev/rfx.c index 41fcaa42351..95affd22a17 100644 --- a/sys/arch/sparc/dev/rfx.c +++ b/sys/arch/sparc/dev/rfx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rfx.c,v 1.10 2005/03/23 17:16:34 miod Exp $ */ +/* $OpenBSD: rfx.c,v 1.11 2006/06/02 20:00:54 miod Exp $ */ /* * Copyright (c) 2004, Miodrag Vallat. @@ -106,7 +106,6 @@ struct rfx_cmap { struct rfx_softc { struct sunfb sc_sunfb; - struct sbusdev sc_sd; struct rom_reg sc_phys; struct intrhand sc_ih; @@ -288,8 +287,6 @@ rfxattach(struct device *parent, struct device *self, void *args) /* enable video */ rfx_burner(sc, 1, 0); - sbus_establish(&sc->sc_sd, &sc->sc_sunfb.sf_dev); - fbwscons_attach(&sc->sc_sunfb, &rfx_accessops, isconsole); } diff --git a/sys/arch/sparc/dev/sbus.c b/sys/arch/sparc/dev/sbus.c index c88609ea36a..c61107d8cdb 100644 --- a/sys/arch/sparc/dev/sbus.c +++ b/sys/arch/sparc/dev/sbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sbus.c,v 1.14 2006/02/25 23:41:39 kettenis Exp $ */ +/* $OpenBSD: sbus.c,v 1.15 2006/06/02 20:00:54 miod Exp $ */ /* $NetBSD: sbus.c,v 1.17 1997/06/01 22:10:39 pk Exp $ */ /* @@ -60,7 +60,6 @@ #include <sparc/dev/dmareg.h> int sbus_print(void *, const char *); -void sbusreset(int); /* autoconfiguration driver */ void sbus_attach(struct device *, struct device *, void *); @@ -264,62 +263,6 @@ sbus_translate(dev, ca) } /* - * Each attached device calls sbus_establish after it initializes - * its sbusdev portion. - */ -void -sbus_establish(sd, dev) - register struct sbusdev *sd; - register struct device *dev; -{ - register struct sbus_softc *sc; - register struct device *curdev; - - /* - * We have to look for the sbus by name, since it is not necessarily - * our immediate parent (i.e. sun4m /iommu/sbus/espdma/esp) - * We don't just use the device structure of the above-attached - * sbus, since we might (in the future) support multiple sbus's. - */ - for (curdev = dev->dv_parent; ; curdev = curdev->dv_parent) { - if (!curdev || !curdev->dv_xname) - panic("sbus_establish: can't find sbus parent for %s", - sd->sd_dev->dv_xname - ? sd->sd_dev->dv_xname - : "<unknown>" ); - - if (strncmp(curdev->dv_xname, "sbus", 4) == 0) - break; - } - sc = (struct sbus_softc *) curdev; - - sd->sd_dev = dev; - sd->sd_bchain = sc->sc_sbdev; - sc->sc_sbdev = sd; -} - -/* - * Reset the given sbus. (???) - */ -void -sbusreset(sbus) - int sbus; -{ - register struct sbusdev *sd; - struct sbus_softc *sc = sbus_cd.cd_devs[sbus]; - struct device *dev; - - printf("reset %s:", sc->sc_dev.dv_xname); - for (sd = sc->sc_sbdev; sd != NULL; sd = sd->sd_bchain) { - if (sd->sd_reset) { - dev = sd->sd_dev; - (*sd->sd_reset)(dev); - printf(" %s", dev->dv_xname); - } - } -} - -/* * Returns true if this sbus slot is capable of dma */ int diff --git a/sys/arch/sparc/dev/sbusvar.h b/sys/arch/sparc/dev/sbusvar.h index 0cc849d92f8..0cd1af28626 100644 --- a/sys/arch/sparc/dev/sbusvar.h +++ b/sys/arch/sparc/dev/sbusvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sbusvar.h,v 1.7 2003/06/02 23:27:54 millert Exp $ */ +/* $OpenBSD: sbusvar.h,v 1.8 2006/06/02 20:00:54 miod Exp $ */ /* $NetBSD: sbusvar.h,v 1.4 1996/04/22 02:35:05 abrown Exp $ */ /* @@ -44,11 +44,6 @@ /* * S-bus variables. */ -struct sbusdev { - struct device *sd_dev; /* backpointer to generic */ - struct sbusdev *sd_bchain; /* forward link in bus chain */ - void (*sd_reset)(struct device *); -}; /* * Sbus driver attach arguments. @@ -63,13 +58,10 @@ struct sbus_attach_args { struct sbus_softc { struct device sc_dev; /* base device */ int sc_clockfreq; /* clock frequency (in Hz) */ - struct sbusdev *sc_sbdev; /* list of all children */ struct rom_range *sc_range; int sc_nrange; int sc_burst; /* burst transfer sizes supported */ }; -int sbusdev_match(struct cfdata *, void *); -void sbus_establish(struct sbusdev *, struct device *); void sbus_translate(struct device *, struct confargs *); int sbus_testdma(struct sbus_softc *, struct confargs *); diff --git a/sys/arch/sparc/dev/spif.c b/sys/arch/sparc/dev/spif.c index 666fbe4551b..41acf0102f6 100644 --- a/sys/arch/sparc/dev/spif.c +++ b/sys/arch/sparc/dev/spif.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spif.c,v 1.19 2004/09/29 07:35:11 miod Exp $ */ +/* $OpenBSD: spif.c,v 1.20 2006/06/02 20:00:54 miod Exp $ */ /* * Copyright (c) 1999 Jason L. Wright (jason@thought.net) @@ -216,8 +216,6 @@ spifattach(parent, self, aux) sc->sc_softih.ih_fun = spifsoftintr; sc->sc_softih.ih_arg = sc; intr_establish(IPL_TTY, &sc->sc_softih, IPL_TTY, self->dv_xname); - - sbus_establish(&sc->sc_sd, &sc->sc_dev); } int diff --git a/sys/arch/sparc/dev/spifvar.h b/sys/arch/sparc/dev/spifvar.h index 138759e92ca..28076a5c095 100644 --- a/sys/arch/sparc/dev/spifvar.h +++ b/sys/arch/sparc/dev/spifvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: spifvar.h,v 1.3 2003/06/02 18:40:59 jason Exp $ */ +/* $OpenBSD: spifvar.h,v 1.4 2006/06/02 20:00:54 miod Exp $ */ /* * Copyright (c) 1999 Jason L. Wright (jason@thought.net) @@ -59,7 +59,6 @@ struct sbpp_softc { struct spif_softc { struct device sc_dev; /* base device */ - struct sbusdev sc_sd; /* sbus device */ struct intrhand sc_stcih; /* stc interrupt vectoring */ struct intrhand sc_ppcih; /* ppc interrupt vectoring */ struct intrhand sc_softih; /* hard interrupt vectoring */ diff --git a/sys/arch/sparc/dev/stp_sbus.c b/sys/arch/sparc/dev/stp_sbus.c index df993017496..427f6712fb1 100644 --- a/sys/arch/sparc/dev/stp_sbus.c +++ b/sys/arch/sparc/dev/stp_sbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: stp_sbus.c,v 1.4 2004/09/29 07:35:11 miod Exp $ */ +/* $OpenBSD: stp_sbus.c,v 1.5 2006/06/02 20:00:54 miod Exp $ */ /* $NetBSD: stp4020.c,v 1.23 2002/06/01 23:51:03 lukem Exp $ */ /*- @@ -64,7 +64,6 @@ struct stp4020_sbus_softc { struct stp4020_softc stp; - struct sbusdev sc_sd; /* SBus device */ struct rom_reg sc_reg; struct rom_reg sc_reg_le; /* rev. copy for pcmcia bus_space access */ struct intrhand sc_ih[2]; @@ -165,8 +164,6 @@ stpattach(parent, self, aux) } } - sbus_establish(&ssc->sc_sd, &sc->sc_dev); - /* * We get to use two SBus interrupt levels. * The higher level we use for status change interrupts; diff --git a/sys/arch/sparc/dev/tcx.c b/sys/arch/sparc/dev/tcx.c index dacef4db0b3..55fd3dd4d1b 100644 --- a/sys/arch/sparc/dev/tcx.c +++ b/sys/arch/sparc/dev/tcx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcx.c,v 1.26 2005/12/25 21:47:15 miod Exp $ */ +/* $OpenBSD: tcx.c,v 1.27 2006/06/02 20:00:54 miod Exp $ */ /* $NetBSD: tcx.c,v 1.8 1997/07/29 09:58:14 fair Exp $ */ /* @@ -97,7 +97,6 @@ /* per-display variables */ struct tcx_softc { struct sunfb sc_sunfb; /* common base part */ - struct sbusdev sc_sd; /* sbus device */ struct rom_reg sc_phys[TCX_NREG]; /* phys addr of h/w */ volatile struct bt_regs *sc_bt; /* Brooktree registers */ volatile struct tcx_thc *sc_thc; /* THC registers */ @@ -246,8 +245,6 @@ tcxattach(struct device *parent, struct device *self, void *args) shutdownhook_establish(tcx_prom, sc); } - sbus_establish(&sc->sc_sd, &sc->sc_sunfb.sf_dev); - nam = getpropstring(node, "model"); if (*nam != '\0') printf(": %s\n%s", nam, self->dv_xname); diff --git a/sys/arch/sparc/dev/ts102.c b/sys/arch/sparc/dev/ts102.c index 0655961449f..5aeb3dd00c2 100644 --- a/sys/arch/sparc/dev/ts102.c +++ b/sys/arch/sparc/dev/ts102.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ts102.c,v 1.16 2005/11/23 11:39:36 mickey Exp $ */ +/* $OpenBSD: ts102.c,v 1.17 2006/06/02 20:00:54 miod Exp $ */ /* * Copyright (c) 2003, 2004, Miodrag Vallat. * @@ -121,7 +121,6 @@ struct tslot_data { struct tslot_softc { struct device sc_dev; - struct sbusdev sc_sd; struct intrhand sc_ih; @@ -247,8 +246,6 @@ tslot_attach(struct device *parent, struct device *self, void *args) intr_establish(ra->ra_intr[0].int_pri, &sc->sc_ih, -1, self->dv_xname); printf(" pri %d", ra->ra_intr[0].int_pri); - sbus_establish(&sc->sc_sd, self); - printf(": %d slots\n", TS102_NUM_SLOTS); /* diff --git a/sys/arch/sparc/dev/tvtwo.c b/sys/arch/sparc/dev/tvtwo.c index 4b8cffa8aef..5c38de21c9c 100644 --- a/sys/arch/sparc/dev/tvtwo.c +++ b/sys/arch/sparc/dev/tvtwo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tvtwo.c,v 1.11 2006/02/12 13:18:07 miod Exp $ */ +/* $OpenBSD: tvtwo.c,v 1.12 2006/06/02 20:00:54 miod Exp $ */ /* * Copyright (c) 2003, 2006, Miodrag Vallat. * All rights reserved. @@ -120,7 +120,6 @@ /* per-display variables */ struct tvtwo_softc { struct sunfb sc_sunfb; /* common base device */ - struct sbusdev sc_sd; /* sbus device */ struct rom_reg sc_phys; volatile u_int8_t *sc_m8; @@ -261,8 +260,6 @@ tvtwoattach(struct device *parent, struct device *self, void *args) fbwscons_console_init(&sc->sc_sunfb, -1); } - sbus_establish(&sc->sc_sd, &sc->sc_sunfb.sf_dev); - printf("%s: %dx%d\n", self->dv_xname, sc->sc_sunfb.sf_width, sc->sc_sunfb.sf_height); diff --git a/sys/arch/sparc/dev/vigra.c b/sys/arch/sparc/dev/vigra.c index 645a42da79f..b885255fccf 100644 --- a/sys/arch/sparc/dev/vigra.c +++ b/sys/arch/sparc/dev/vigra.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vigra.c,v 1.15 2005/03/23 17:16:34 miod Exp $ */ +/* $OpenBSD: vigra.c,v 1.16 2006/06/02 20:00:54 miod Exp $ */ /* * Copyright (c) 2002, 2003, Miodrag Vallat. @@ -173,7 +173,6 @@ union vigracmap { /* per-display variables */ struct vigra_softc { struct sunfb sc_sunfb; /* common base part */ - struct sbusdev sc_sd; /* sbus device */ struct rom_reg sc_phys; /* phys address description */ volatile struct csregs *sc_regs;/* control registers */ volatile union dac *sc_ramdac; /* ramdac registers */ @@ -322,8 +321,6 @@ vigraattach(struct device *parent, struct device *self, void *args) fbwscons_console_init(&sc->sc_sunfb, row); } - sbus_establish(&sc->sc_sd, &sc->sc_sunfb.sf_dev); - fbwscons_attach(&sc->sc_sunfb, &vigra_accessops, isconsole); } diff --git a/sys/arch/sparc/dev/xbox.c b/sys/arch/sparc/dev/xbox.c index 35ae3a2b313..4c4f035347b 100644 --- a/sys/arch/sparc/dev/xbox.c +++ b/sys/arch/sparc/dev/xbox.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xbox.c,v 1.4 2006/03/04 12:38:58 miod Exp $ */ +/* $OpenBSD: xbox.c,v 1.5 2006/06/02 20:00:54 miod Exp $ */ /* * Copyright (c) 1999 Jason L. Wright (jason@thought.net) @@ -141,8 +141,6 @@ xboxattach(parent, self, aux) xbox_fix_range(sc, (struct sbus_softc *)parent); - sbus_establish(&sc->sc_sd, &sc->sc_dv); - printf("\n"); oca = (*ca); diff --git a/sys/arch/sparc/dev/xboxvar.h b/sys/arch/sparc/dev/xboxvar.h index 28c9b0de7b5..ae318bc2d1a 100644 --- a/sys/arch/sparc/dev/xboxvar.h +++ b/sys/arch/sparc/dev/xboxvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: xboxvar.h,v 1.2 2003/06/02 18:40:59 jason Exp $ */ +/* $OpenBSD: xboxvar.h,v 1.3 2006/06/02 20:00:54 miod Exp $ */ /* * Copyright (c) 1999 Jason L. Wright (jason@thought.net) @@ -28,7 +28,6 @@ struct xbox_softc { struct device sc_dv; /* base device */ - struct sbusdev sc_sd; /* sbus device */ u_int32_t sc_key; /* device key */ int sc_node; /* sbus node */ int sc_attached; /* has sbus attached? */ diff --git a/sys/arch/sparc/dev/zx.c b/sys/arch/sparc/dev/zx.c index 5e30e8cc4b2..8dbf65485ce 100644 --- a/sys/arch/sparc/dev/zx.c +++ b/sys/arch/sparc/dev/zx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zx.c,v 1.14 2006/03/04 10:26:53 miod Exp $ */ +/* $OpenBSD: zx.c,v 1.15 2006/06/02 20:00:54 miod Exp $ */ /* $NetBSD: zx.c,v 1.5 2002/10/02 16:52:46 thorpej Exp $ */ /* @@ -113,7 +113,6 @@ struct zx_cmap { struct zx_softc { struct sunfb sc_sunfb; - struct sbusdev sc_sd; struct rom_reg sc_phys; struct zx_cmap sc_cmap; /* shadow color map for overlay plane */ @@ -287,8 +286,6 @@ zx_attach(struct device *parent, struct device *self, void *args) /* enable video */ zx_burner(sc, 1, 0); - sbus_establish(&sc->sc_sd, &sc->sc_sunfb.sf_dev); - fbwscons_attach(&sc->sc_sunfb, &zx_accessops, isconsole); } diff --git a/sys/arch/sparc64/dev/ce4231var.h b/sys/arch/sparc64/dev/ce4231var.h index 269d78a6849..85a3c383542 100644 --- a/sys/arch/sparc64/dev/ce4231var.h +++ b/sys/arch/sparc64/dev/ce4231var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ce4231var.h,v 1.7 2004/09/29 19:17:43 miod Exp $ */ +/* $OpenBSD: ce4231var.h,v 1.8 2006/06/02 20:00:56 miod Exp $ */ /* * Copyright (c) 1999 Jason L. Wright (jason@thought.net) @@ -54,7 +54,6 @@ struct cs_volume { struct ce4231_softc { struct device sc_dev; /* base device */ - struct sbusdev sc_sd; /* sbus device */ struct intrhand sc_ih; /* interrupt vectoring */ bus_dma_tag_t sc_dmatag; bus_space_tag_t sc_bustag; /* CS4231/DMA register tag */ diff --git a/sys/arch/sparc64/dev/sbus.c b/sys/arch/sparc64/dev/sbus.c index 26f6d71156a..4ac635726b6 100644 --- a/sys/arch/sparc64/dev/sbus.c +++ b/sys/arch/sparc64/dev/sbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sbus.c,v 1.23 2005/09/08 15:25:54 martin Exp $ */ +/* $OpenBSD: sbus.c,v 1.24 2006/06/02 20:00:56 miod Exp $ */ /* $NetBSD: sbus.c,v 1.46 2001/10/07 20:30:41 eeh Exp $ */ /*- @@ -135,8 +135,6 @@ int sbus_debug = 0; #define DPRINTF(l, s) #endif -void sbusreset(int); - bus_space_tag_t sbus_alloc_bustag(struct sbus_softc *, int); bus_dma_tag_t sbus_alloc_dmatag(struct sbus_softc *, bus_dma_tag_t); int sbus_get_intr(struct sbus_softc *, int, @@ -557,62 +555,6 @@ sbus_bus_addr(bus_space_tag_t t, u_int btype, u_int offset) return (baddr); } - -/* - * Each attached device calls sbus_establish after it initializes - * its sbusdev portion. - */ -void -sbus_establish(struct sbusdev *sd, struct device *dev) -{ - struct sbus_softc *sc; - struct device *curdev; - - /* - * We have to look for the sbus by name, since it is not necessarily - * our immediate parent. - * We don't just use the device structure of the above-attached - * sbus, since we support multiple sbus's. - */ - for (curdev = dev->dv_parent; ; curdev = curdev->dv_parent) { - if (!curdev || !curdev->dv_xname) - panic("sbus_establish: can't find sbus parent for %s", - sd->sd_dev->dv_xname - ? sd->sd_dev->dv_xname - : "<unknown>" ); - - if (strncmp(curdev->dv_xname, "sbus", 4) == 0) - break; - } - sc = (struct sbus_softc *) curdev; - - sd->sd_dev = dev; - sd->sd_bchain = sc->sc_sbdev; - sc->sc_sbdev = sd; -} - -/* - * Reset the given sbus. - */ -void -sbusreset(int sbus) -{ - struct sbusdev *sd; - struct sbus_softc *sc = sbus_cd.cd_devs[sbus]; - struct device *dev; - - printf("reset %s:", sc->sc_dev.dv_xname); - for (sd = sc->sc_sbdev; sd != NULL; sd = sd->sd_bchain) { - if (sd->sd_reset) { - dev = sd->sd_dev; - (*sd->sd_reset)(dev); - printf(" %s", dev->dv_xname); - } - } - /* Reload iommu regs */ - iommu_reset(&sc->sc_is); -} - /* * Handle an overtemp situation. * diff --git a/sys/arch/sparc64/dev/sbusvar.h b/sys/arch/sparc64/dev/sbusvar.h index cb3715c76a6..95f432842c5 100644 --- a/sys/arch/sparc64/dev/sbusvar.h +++ b/sys/arch/sparc64/dev/sbusvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sbusvar.h,v 1.7 2005/03/05 01:44:52 miod Exp $ */ +/* $OpenBSD: sbusvar.h,v 1.8 2006/06/02 20:00:56 miod Exp $ */ /* $NetBSD: sbusvar.h,v 1.7 1999/06/05 05:30:43 mrg Exp $ */ /*- @@ -100,7 +100,6 @@ struct sbus_softc { bus_space_handle_t sc_bh; bus_dma_tag_t sc_dmatag; int sc_clockfreq; /* clock frequency (in Hz) */ - struct sbusdev *sc_sbdev; /* list of all children */ struct sbus_range *sc_range; int sc_nrange; int sc_burst; /* burst transfer sizes supported */ diff --git a/sys/arch/sparc64/dev/stp_sbus.c b/sys/arch/sparc64/dev/stp_sbus.c index 6b95093946e..19bf867c76f 100644 --- a/sys/arch/sparc64/dev/stp_sbus.c +++ b/sys/arch/sparc64/dev/stp_sbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: stp_sbus.c,v 1.6 2004/03/02 23:10:17 miod Exp $ */ +/* $OpenBSD: stp_sbus.c,v 1.7 2006/06/02 20:00:56 miod Exp $ */ /* $NetBSD: stp4020.c,v 1.23 2002/06/01 23:51:03 lukem Exp $ */ /*- @@ -65,7 +65,6 @@ struct stp4020_sbus_softc { struct stp4020_softc stp; - struct sbusdev sc_sd; /* SBus device */ }; int stpmatch(struct device *, void *, void *); @@ -95,7 +94,6 @@ stpattach(parent, self, aux) void *aux; { struct sbus_attach_args *sa = aux; - struct stp4020_sbus_softc *ssc = (void *)self; struct stp4020_softc *sc = (void *)self; int node; int i; @@ -161,8 +159,6 @@ stpattach(parent, self, aux) } } - sbus_establish(&ssc->sc_sd, &sc->sc_dev); - /* * We get to use two SBus interrupt levels. * The higher level we use for status change interrupts; diff --git a/sys/dev/sbus/agten.c b/sys/dev/sbus/agten.c index 9692977cd7e..2db079e7a6b 100644 --- a/sys/dev/sbus/agten.c +++ b/sys/dev/sbus/agten.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agten.c,v 1.4 2005/03/07 16:44:52 miod Exp $ */ +/* $OpenBSD: agten.c,v 1.5 2006/06/02 20:00:56 miod Exp $ */ /* * Copyright (c) 2002, 2003, Miodrag Vallat. * All rights reserved. @@ -92,7 +92,6 @@ struct agten_cmap { /* per-display variables */ struct agten_softc { struct sunfb sc_sunfb; /* common base part */ - struct sbusdev sc_sd; /* sbus device */ bus_space_tag_t sc_bustag; bus_addr_t sc_paddr; @@ -232,8 +231,6 @@ agtenattach(struct device *parent, struct device *self, void *args) fbwscons_console_init(&sc->sc_sunfb, -1); } - sbus_establish(&sc->sc_sd, &sc->sc_sunfb.sf_dev); - fbwscons_attach(&sc->sc_sunfb, &agten_accessops, isconsole); } diff --git a/sys/dev/sbus/be.c b/sys/dev/sbus/be.c index 3a2f7114daf..c2a3a9dee3c 100644 --- a/sys/dev/sbus/be.c +++ b/sys/dev/sbus/be.c @@ -1,4 +1,4 @@ -/* $OpenBSD: be.c,v 1.18 2006/03/25 22:41:46 djm Exp $ */ +/* $OpenBSD: be.c,v 1.19 2006/06/02 20:00:56 miod Exp $ */ /* $NetBSD: be.c,v 1.26 2001/03/20 15:39:20 pk Exp $ */ /*- @@ -109,7 +109,6 @@ struct be_softc { struct device sc_dev; - struct sbusdev sc_sd; /* sbus device */ bus_space_tag_t sc_bustag; /* bus & dma tags */ bus_dma_tag_t sc_dmatag; bus_dmamap_t sc_dmamap; diff --git a/sys/dev/sbus/bwtwo.c b/sys/dev/sbus/bwtwo.c index 70d4843318c..aabb84901e2 100644 --- a/sys/dev/sbus/bwtwo.c +++ b/sys/dev/sbus/bwtwo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bwtwo.c,v 1.15 2005/03/15 18:40:16 miod Exp $ */ +/* $OpenBSD: bwtwo.c,v 1.16 2006/06/02 20:00:56 miod Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -97,7 +97,6 @@ struct bwtwo_softc { struct sunfb sc_sunfb; - struct sbusdev sc_sd; bus_space_tag_t sc_bustag; bus_addr_t sc_paddr; bus_space_handle_t sc_ctrl_regs; @@ -195,8 +194,6 @@ bwtwoattach(parent, self, aux) console = bwtwo_is_console(node); - sbus_establish(&sc->sc_sd, &sc->sc_sunfb.sf_dev); - bwtwo_burner(sc, 1, 0); printf(", %dx%d\n", sc->sc_sunfb.sf_width, sc->sc_sunfb.sf_height); diff --git a/sys/dev/sbus/cgsix.c b/sys/dev/sbus/cgsix.c index b9feb0f2e93..3821e8979c1 100644 --- a/sys/dev/sbus/cgsix.c +++ b/sys/dev/sbus/cgsix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cgsix.c,v 1.52 2005/03/15 18:40:16 miod Exp $ */ +/* $OpenBSD: cgsix.c,v 1.53 2006/06/02 20:00:56 miod Exp $ */ /* * Copyright (c) 2001 Jason L. Wright (jason@thought.net) @@ -208,8 +208,6 @@ cgsixattach(struct device *parent, struct device *self, void *aux) cgsix_burner(sc, 1, 0); - sbus_establish(&sc->sc_sd, self); - sc->sc_sunfb.sf_ro.ri_bits = (void *)bus_space_vaddr(sc->sc_bustag, sc->sc_vid_regs); sc->sc_sunfb.sf_ro.ri_hw = sc; diff --git a/sys/dev/sbus/cgsixreg.h b/sys/dev/sbus/cgsixreg.h index 06d81c410ba..7035f30a50a 100644 --- a/sys/dev/sbus/cgsixreg.h +++ b/sys/dev/sbus/cgsixreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cgsixreg.h,v 1.8 2003/06/18 17:35:30 miod Exp $ */ +/* $OpenBSD: cgsixreg.h,v 1.9 2006/06/02 20:00:56 miod Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -265,7 +265,6 @@ union bt_cmap { struct cgsix_softc { struct sunfb sc_sunfb; - struct sbusdev sc_sd; bus_space_tag_t sc_bustag; bus_addr_t sc_paddr; bus_space_handle_t sc_bt_regs; diff --git a/sys/dev/sbus/cgthree.c b/sys/dev/sbus/cgthree.c index b94fcc4ab53..9f623915573 100644 --- a/sys/dev/sbus/cgthree.c +++ b/sys/dev/sbus/cgthree.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cgthree.c,v 1.40 2005/03/15 18:40:17 miod Exp $ */ +/* $OpenBSD: cgthree.c,v 1.41 2006/06/02 20:00:56 miod Exp $ */ /* * Copyright (c) 2001 Jason L. Wright (jason@thought.net) @@ -119,7 +119,6 @@ union bt_cmap { struct cgthree_softc { struct sunfb sc_sunfb; - struct sbusdev sc_sd; bus_space_tag_t sc_bustag; bus_addr_t sc_paddr; bus_space_handle_t sc_ctrl_regs; @@ -249,8 +248,6 @@ cgthreeattach(struct device *parent, struct device *self, void *aux) console = cgthree_is_console(node); - sbus_establish(&sc->sc_sd, &sc->sc_sunfb.sf_dev); - cgthree_reset(sc); BT_WRITE(sc, BT_ADDR, 0); diff --git a/sys/dev/sbus/cgtwelve.c b/sys/dev/sbus/cgtwelve.c index 9d65f969803..5f5076bd9cb 100644 --- a/sys/dev/sbus/cgtwelve.c +++ b/sys/dev/sbus/cgtwelve.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cgtwelve.c,v 1.3 2005/03/13 23:05:23 miod Exp $ */ +/* $OpenBSD: cgtwelve.c,v 1.4 2006/06/02 20:00:56 miod Exp $ */ /* * Copyright (c) 2002, 2003 Miodrag Vallat. All rights reserved. @@ -75,7 +75,6 @@ /* per-display variables */ struct cgtwelve_softc { struct sunfb sc_sunfb; /* common base device */ - struct sbusdev sc_sd; /* sbus device */ bus_space_tag_t sc_bustag; bus_addr_t sc_paddr; @@ -245,8 +244,6 @@ cgtwelveattach(struct device *parent, struct device *self, void *args) shutdownhook_establish(cgtwelve_prom, sc); } - sbus_establish(&sc->sc_sd, &sc->sc_sunfb.sf_dev); - printf("%s: %dx%d", self->dv_xname, sc->sc_sunfb.sf_width, sc->sc_sunfb.sf_height); ps = getpropstring(node, "ucoderev"); diff --git a/sys/dev/sbus/cs4231.c b/sys/dev/sbus/cs4231.c index 4387f589e0f..3f43629560b 100644 --- a/sys/dev/sbus/cs4231.c +++ b/sys/dev/sbus/cs4231.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cs4231.c,v 1.27 2005/07/09 22:23:15 miod Exp $ */ +/* $OpenBSD: cs4231.c,v 1.28 2006/06/02 20:00:56 miod Exp $ */ /* * Copyright (c) 1999 Jason L. Wright (jason@thought.net) @@ -246,8 +246,6 @@ cs4231_attach(struct device *parent, struct device *self, void *aux) return; } - sbus_establish(&sc->sc_sd, &sc->sc_dev); - sbusburst = ((struct sbus_softc *)parent)->sc_burst; if (sbusburst == 0) sbusburst = SBUS_BURST_32 - 1; /* 1->16 */ diff --git a/sys/dev/sbus/cs4231var.h b/sys/dev/sbus/cs4231var.h index 185521db457..b51202743bb 100644 --- a/sys/dev/sbus/cs4231var.h +++ b/sys/dev/sbus/cs4231var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cs4231var.h,v 1.8 2004/09/29 19:17:43 miod Exp $ */ +/* $OpenBSD: cs4231var.h,v 1.9 2006/06/02 20:00:56 miod Exp $ */ /* * Copyright (c) 1999 Jason L. Wright (jason@thought.net) @@ -64,7 +64,6 @@ struct cs_channel { struct cs4231_softc { struct device sc_dev; /* base device */ - struct sbusdev sc_sd; /* sbus device */ struct intrhand sc_ih; /* interrupt vectoring */ bus_dma_tag_t sc_dmatag; bus_space_tag_t sc_bustag; /* CS4231/APC register tag */ diff --git a/sys/dev/sbus/dma_sbus.c b/sys/dev/sbus/dma_sbus.c index dab7e6c320e..e4b94a5cc05 100644 --- a/sys/dev/sbus/dma_sbus.c +++ b/sys/dev/sbus/dma_sbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dma_sbus.c,v 1.12 2005/03/03 01:41:45 miod Exp $ */ +/* $OpenBSD: dma_sbus.c,v 1.13 2006/06/02 20:00:56 miod Exp $ */ /* $NetBSD: dma_sbus.c,v 1.5 2000/07/09 20:57:42 pk Exp $ */ /*- @@ -86,7 +86,6 @@ struct dma_softc { struct lsi64854_softc sc_lsi64854; /* base device */ - struct sbusdev sc_sd; /* sbus device */ }; int dmamatch_sbus(struct device *, void *, void *); @@ -228,7 +227,6 @@ dmaattach_sbus(parent, self, aux) sc->sc_channel = L64854_CHANNEL_SCSI; } - sbus_establish(&dsc->sc_sd, &sc->sc_dev); sbt = dma_alloc_bustag(dsc); if (lsi64854_attach(sc) != 0) return; diff --git a/sys/dev/sbus/esp_sbus.c b/sys/dev/sbus/esp_sbus.c index 6ba67c2cc9d..1036fc1566a 100644 --- a/sys/dev/sbus/esp_sbus.c +++ b/sys/dev/sbus/esp_sbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: esp_sbus.c,v 1.17 2006/03/05 21:48:56 miod Exp $ */ +/* $OpenBSD: esp_sbus.c,v 1.18 2006/06/02 20:00:56 miod Exp $ */ /* $NetBSD: esp_sbus.c,v 1.14 2001/04/25 17:53:37 bouyer Exp $ */ /*- @@ -81,7 +81,6 @@ static int esp_unit_offset; struct esp_softc { struct ncr53c9x_softc sc_ncr53c9x; /* glue to MI code */ - struct sbusdev sc_sd; /* sbus device */ bus_space_tag_t sc_bustag; bus_dma_tag_t sc_dmatag; @@ -278,10 +277,6 @@ espattach_sbus(struct device *parent, struct device *self, void *aux) esc->sc_pri = sa->sa_pri; - /* add me to the sbus structures */ - esc->sc_sd.sd_reset = (void *) ncr53c9x_reset; - sbus_establish(&esc->sc_sd, &sc->sc_dev); - printf("%s", self->dv_xname); espattach(esc, &esp_sbus_glue); @@ -349,10 +344,6 @@ espattach_sbus(struct device *parent, struct device *self, void *aux) esc->sc_pri = sa->sa_pri; - /* add me to the sbus structures */ - esc->sc_sd.sd_reset = (void *) ncr53c9x_reset; - sbus_establish(&esc->sc_sd, &sc->sc_dev); - if (strcmp("ptscII", sa->sa_name) == 0) { espattach(esc, &esp_sbus_glue1); } else { @@ -412,10 +403,6 @@ espattach_dma(struct device *parent, struct device *self, void *aux) esc->sc_pri = sa->sa_pri; - /* Assume SBus is grandparent */ - esc->sc_sd.sd_reset = (void *) ncr53c9x_reset; - sbus_establish(&esc->sc_sd, parent); - espattach(esc, &esp_sbus_glue); } diff --git a/sys/dev/sbus/if_hme_sbus.c b/sys/dev/sbus/if_hme_sbus.c index f7383ddabff..7aa21844bdb 100644 --- a/sys/dev/sbus/if_hme_sbus.c +++ b/sys/dev/sbus/if_hme_sbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_hme_sbus.c,v 1.9 2005/10/21 22:10:56 brad Exp $ */ +/* $OpenBSD: if_hme_sbus.c,v 1.10 2006/06/02 20:00:56 miod Exp $ */ /* $NetBSD: if_hme_sbus.c,v 1.6 2001/02/28 14:52:48 mrg Exp $ */ /*- @@ -73,7 +73,6 @@ struct hmesbus_softc { struct hme_softc hsc_hme; /* HME device */ - struct sbusdev hsc_sbus; /* SBus device */ }; int hmematch_sbus(struct device *, void *, void *); @@ -100,7 +99,6 @@ hmeattach_sbus(struct device *parent, struct device *self, void *aux) struct sbus_attach_args *sa = aux; struct hmesbus_softc *hsc = (void *)self; struct hme_softc *sc = &hsc->hsc_hme; - struct sbusdev *sd = &hsc->hsc_sbus; u_int32_t burst, sbusburst; int node; /* XXX the following declarations should be elsewhere */ @@ -159,9 +157,6 @@ hmeattach_sbus(struct device *parent, struct device *self, void *aux) return; } - sd->sd_reset = (void *)hme_reset; - sbus_establish(sd, self); - if (OF_getprop(sa->sa_node, "local-mac-address", sc->sc_enaddr, ETHER_ADDR_LEN) <= 0) myetheraddr(sc->sc_enaddr); diff --git a/sys/dev/sbus/if_le.c b/sys/dev/sbus/if_le.c index a04303da7b4..a218799c43c 100644 --- a/sys/dev/sbus/if_le.c +++ b/sys/dev/sbus/if_le.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_le.c,v 1.11 2006/06/02 19:58:34 miod Exp $ */ +/* $OpenBSD: if_le.c,v 1.12 2006/06/02 20:00:56 miod Exp $ */ /* $NetBSD: if_le.c,v 1.17 2001/05/30 11:46:35 mrg Exp $ */ /*- @@ -74,7 +74,6 @@ struct le_softc { struct am7990_softc sc_am7990; /* glue to MI code */ - struct sbusdev sc_sd; /* sbus device */ bus_space_tag_t sc_bustag; bus_dma_tag_t sc_dmatag; bus_dmamap_t sc_dmamap; @@ -150,7 +149,6 @@ leattach_sbus(struct device *parent, struct device *self, void *aux) struct le_softc *lesc = (struct le_softc *)self; struct am7990_softc *sc = &lesc->sc_am7990; bus_dma_tag_t dmatag; - struct sbusdev *sd; /* XXX the following declarations should be elsewhere */ extern void myetheraddr(u_char *); extern struct cfdriver lebuffer_cd; @@ -194,9 +192,6 @@ leattach_sbus(struct device *parent, struct device *self, void *aux) } } - lesc->sc_sd.sd_reset = (void *)am7990_reset; - sbus_establish(&lesc->sc_sd, &sc->sc_dev); - if (sc->sc_mem == 0) { bus_dma_segment_t seg; int rseg, error; diff --git a/sys/dev/sbus/if_le_lebuffer.c b/sys/dev/sbus/if_le_lebuffer.c index ffc7137c6bc..ba069fa3fbe 100644 --- a/sys/dev/sbus/if_le_lebuffer.c +++ b/sys/dev/sbus/if_le_lebuffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_le_lebuffer.c,v 1.6 2006/05/15 21:43:23 miod Exp $ */ +/* $OpenBSD: if_le_lebuffer.c,v 1.7 2006/06/02 20:00:56 miod Exp $ */ /* $NetBSD: if_le_lebuffer.c,v 1.10 2002/03/11 16:00:56 pk Exp $ */ /*- @@ -75,7 +75,6 @@ struct le_softc { struct am7990_softc sc_am7990; /* glue to MI code */ - struct sbusdev sc_sd; /* sbus device */ bus_space_tag_t sc_bustag; bus_dma_tag_t sc_dmatag; bus_space_handle_t sc_reg; /* LANCE registers */ @@ -174,10 +173,6 @@ leattach_lebuffer(struct device *parent, struct device *self, void *aux) sc->sc_conf3 = getpropint(sa->sa_node, "busmaster-regval", LE_C3_BSWP | LE_C3_ACON | LE_C3_BCON); - /* Assume SBus is grandparent */ - lesc->sc_sd.sd_reset = (void *)am7990_reset; - sbus_establish(&lesc->sc_sd, parent); - myetheraddr(sc->sc_arpcom.ac_enaddr); sc->sc_copytodesc = am7990_copytobuf_contig; diff --git a/sys/dev/sbus/if_le_ledma.c b/sys/dev/sbus/if_le_ledma.c index 3d66ffcce0e..8ec1be77465 100644 --- a/sys/dev/sbus/if_le_ledma.c +++ b/sys/dev/sbus/if_le_ledma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_le_ledma.c,v 1.11 2006/05/15 21:43:23 miod Exp $ */ +/* $OpenBSD: if_le_ledma.c,v 1.12 2006/06/02 20:00:56 miod Exp $ */ /* $NetBSD: if_le_ledma.c,v 1.14 2001/05/30 11:46:35 mrg Exp $ */ /*- @@ -76,7 +76,6 @@ struct le_softc { struct am7990_softc sc_am7990; /* glue to MI code */ - struct sbusdev sc_sd; /* sbus device */ bus_space_tag_t sc_bustag; bus_dmamap_t sc_dmamap; bus_space_handle_t sc_reg; /* LANCE registers */ @@ -382,11 +381,6 @@ leattach_ledma(struct device *parent, struct device *self, void *aux) sc->sc_addr = lesc->sc_laddr & 0xffffff; sc->sc_conf3 = LE_C3_BSWP | LE_C3_ACON | LE_C3_BCON; - - /* Assume SBus is grandparent */ - lesc->sc_sd.sd_reset = (void *)am7990_reset; - sbus_establish(&lesc->sc_sd, parent); - ifmedia_init(&sc->sc_ifmedia, 0, lemediachange, lemediastatus); ifmedia_add(&sc->sc_ifmedia, IFM_ETHER | IFM_10_T, 0, NULL); ifmedia_add(&sc->sc_ifmedia, IFM_ETHER | IFM_10_5, 0, NULL); diff --git a/sys/dev/sbus/isp_sbus.c b/sys/dev/sbus/isp_sbus.c index d7463c37d43..35b9403240b 100644 --- a/sys/dev/sbus/isp_sbus.c +++ b/sys/dev/sbus/isp_sbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isp_sbus.c,v 1.7 2005/03/02 17:10:03 miod Exp $ */ +/* $OpenBSD: isp_sbus.c,v 1.8 2006/06/02 20:00:56 miod Exp $ */ /* $NetBSD: isp_sbus.c,v 1.46 2001/09/26 20:53:14 eeh Exp $ */ /* @@ -107,7 +107,6 @@ static struct ispmdvec mdvec = { struct isp_sbussoftc { struct ispsoftc sbus_isp; - struct sbusdev sbus_sd; sdparam sbus_dev; bus_space_tag_t sbus_bustag; bus_space_handle_t sbus_reg; @@ -253,7 +252,6 @@ isp_sbus_attach(struct device *parent, struct device *self, void *aux) /* Establish interrupt channel */ bus_intr_establish(sbc->sbus_bustag, sbc->sbus_pri, IPL_BIO, 0, isp_sbus_intr, sbc, self->dv_xname); - sbus_establish(&sbc->sbus_sd, &sbc->sbus_isp.isp_osinfo._dev); /* * Set up logging levels. diff --git a/sys/dev/sbus/lebuffer.c b/sys/dev/sbus/lebuffer.c index 483f20f0fc4..4e9397295fd 100644 --- a/sys/dev/sbus/lebuffer.c +++ b/sys/dev/sbus/lebuffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lebuffer.c,v 1.5 2003/07/07 15:37:07 jason Exp $ */ +/* $OpenBSD: lebuffer.c,v 1.6 2006/06/02 20:00:56 miod Exp $ */ /* $NetBSD: lebuffer.c,v 1.12 2002/03/11 16:00:57 pk Exp $ */ /*- @@ -130,8 +130,6 @@ lebufattach(struct device *parent, struct device *self, void *aux) /* Clamp at parent's burst sizes */ sc->sc_burst &= sbusburst; - sbus_establish(&sc->sc_sd, &sc->sc_dev); - /* Allocate a bus tag */ sbt = malloc(sizeof(*sbt), M_DEVBUF, M_NOWAIT); if (sbt == NULL) { diff --git a/sys/dev/sbus/lebuffervar.h b/sys/dev/sbus/lebuffervar.h index 42bac0f1972..e7a791711c2 100644 --- a/sys/dev/sbus/lebuffervar.h +++ b/sys/dev/sbus/lebuffervar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: lebuffervar.h,v 1.2 2001/08/20 19:48:33 jason Exp $ */ +/* $OpenBSD: lebuffervar.h,v 1.3 2006/06/02 20:00:56 miod Exp $ */ /* $NetBSD: lebuffervar.h,v 1.2 1998/07/27 19:25:34 pk Exp $ */ /*- @@ -41,7 +41,6 @@ struct lebuf_softc { struct device sc_dev; /* us as a device */ bus_space_tag_t sc_bustag; bus_dma_tag_t sc_dmatag; - struct sbusdev sc_sd; /* sbus device */ u_int sc_rev; /* revision */ int sc_node; /* PROM node ID */ int sc_burst; /* DVMA burst size in effect */ diff --git a/sys/dev/sbus/mgx.c b/sys/dev/sbus/mgx.c index fd310cfa729..5009dbd2485 100644 --- a/sys/dev/sbus/mgx.c +++ b/sys/dev/sbus/mgx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mgx.c,v 1.5 2005/03/13 23:05:23 miod Exp $ */ +/* $OpenBSD: mgx.c,v 1.6 2006/06/02 20:00:56 miod Exp $ */ /* * Copyright (c) 2003, Miodrag Vallat. * All rights reserved. @@ -81,7 +81,6 @@ /* per-display variables */ struct mgx_softc { struct sunfb sc_sunfb; /* common base device */ - struct sbusdev sc_sd; /* sbus device */ bus_space_tag_t sc_bustag; bus_addr_t sc_paddr; @@ -220,8 +219,6 @@ mgxattach(struct device *parent, struct device *self, void *args) fbwscons_console_init(&sc->sc_sunfb, -1); } - sbus_establish(&sc->sc_sd, &sc->sc_sunfb.sf_dev); - fbwscons_attach(&sc->sc_sunfb, &mgx_accessops, isconsole); } diff --git a/sys/dev/sbus/qe.c b/sys/dev/sbus/qe.c index 2bbca6fcd85..3977332c19f 100644 --- a/sys/dev/sbus/qe.c +++ b/sys/dev/sbus/qe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qe.c,v 1.18 2006/03/25 22:41:46 djm Exp $ */ +/* $OpenBSD: qe.c,v 1.19 2006/06/02 20:00:56 miod Exp $ */ /* $NetBSD: qe.c,v 1.16 2001/03/30 17:30:18 christos Exp $ */ /*- @@ -115,7 +115,6 @@ struct qe_softc { struct device sc_dev; /* base device */ - struct sbusdev sc_sd; /* sbus device */ bus_space_tag_t sc_bustag; /* bus & dma tags */ bus_dma_tag_t sc_dmatag; bus_dmamap_t sc_dmamap; diff --git a/sys/dev/sbus/qec.c b/sys/dev/sbus/qec.c index 30c58200ec8..5f118c0b5a3 100644 --- a/sys/dev/sbus/qec.c +++ b/sys/dev/sbus/qec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qec.c,v 1.9 2004/12/05 04:31:58 jsg Exp $ */ +/* $OpenBSD: qec.c,v 1.10 2006/06/02 20:00:56 miod Exp $ */ /* $NetBSD: qec.c,v 1.12 2000/12/04 20:12:55 fvdl Exp $ */ /*- @@ -178,8 +178,6 @@ qecattach(parent, self, aux) /* Clamp at parent's burst sizes */ sc->sc_burst &= sbusburst; - sbus_establish(&sc->sc_sd, &sc->sc_dev); - /* * Collect address translations from the OBP. */ diff --git a/sys/dev/sbus/qecvar.h b/sys/dev/sbus/qecvar.h index bbba0d88758..4507c38f422 100644 --- a/sys/dev/sbus/qecvar.h +++ b/sys/dev/sbus/qecvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: qecvar.h,v 1.2 2002/03/14 01:27:02 millert Exp $ */ +/* $OpenBSD: qecvar.h,v 1.3 2006/06/02 20:00:56 miod Exp $ */ /* $NetBSD: qecvar.h,v 1.4 1999/01/17 20:47:50 pk Exp $ */ /*- @@ -39,7 +39,6 @@ struct qec_softc { struct device sc_dev; /* us as a device */ - struct sbusdev sc_sd; /* sbus device */ bus_space_tag_t sc_bustag; /* bus & dma tags */ bus_dma_tag_t sc_dmatag; struct sbus_range *sc_range; /* PROM ranges */ diff --git a/sys/dev/sbus/rfx.c b/sys/dev/sbus/rfx.c index 5b8b3f0ffe0..bd82c417136 100644 --- a/sys/dev/sbus/rfx.c +++ b/sys/dev/sbus/rfx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rfx.c,v 1.5 2005/03/13 23:05:23 miod Exp $ */ +/* $OpenBSD: rfx.c,v 1.6 2006/06/02 20:00:56 miod Exp $ */ /* * Copyright (c) 2004, Miodrag Vallat. @@ -108,7 +108,6 @@ struct rfx_cmap { struct rfx_softc { struct sunfb sc_sunfb; - struct sbusdev sc_sd; bus_space_tag_t sc_bustag; bus_addr_t sc_paddr; @@ -315,8 +314,6 @@ rfxattach(struct device *parent, struct device *self, void *args) /* enable video */ rfx_burner(sc, 1, 0); - sbus_establish(&sc->sc_sd, &sc->sc_sunfb.sf_dev); - fbwscons_attach(&sc->sc_sunfb, &rfx_accessops, isconsole); } diff --git a/sys/dev/sbus/sbusvar.h b/sys/dev/sbus/sbusvar.h index b1592a0ce6a..ae5061ea590 100644 --- a/sys/dev/sbus/sbusvar.h +++ b/sys/dev/sbus/sbusvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sbusvar.h,v 1.9 2005/03/08 21:35:04 miod Exp $ */ +/* $OpenBSD: sbusvar.h,v 1.10 2006/06/02 20:00:56 miod Exp $ */ /* $NetBSD: sbusvar.h,v 1.11 2000/11/01 06:18:45 eeh Exp $ */ /*- @@ -45,12 +45,6 @@ struct sbus_softc; /* * S-bus variables. */ -struct sbusdev { - struct device *sd_dev; /* backpointer to generic */ - struct sbusdev *sd_bchain; /* forward link in bus chain */ - void (*sd_reset)(struct device *); -}; - /* Device register space description */ struct sbus_reg { @@ -101,8 +95,6 @@ struct sbus_attach_args { int sbus_print(void *, const char *); -void sbus_establish(struct sbusdev *, struct device *); - int sbus_setup_attach_args( struct sbus_softc *, bus_space_tag_t, @@ -122,7 +114,6 @@ struct sbus_softc { bus_space_tag_t sc_bustag; bus_dma_tag_t sc_dmatag; int sc_clockfreq; /* clock frequency (in Hz) */ - struct sbusdev *sc_sbdev; /* list of all children */ struct sbus_range *sc_range; int sc_nrange; int sc_burst; /* burst transfer sizes supported */ diff --git a/sys/dev/sbus/spifvar.h b/sys/dev/sbus/spifvar.h index b4fe5ace619..7aac72eee7e 100644 --- a/sys/dev/sbus/spifvar.h +++ b/sys/dev/sbus/spifvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: spifvar.h,v 1.3 2003/06/02 18:32:41 jason Exp $ */ +/* $OpenBSD: spifvar.h,v 1.4 2006/06/02 20:00:56 miod Exp $ */ /* * Copyright (c) 1999-2002 Jason L. Wright (jason@thought.net) @@ -64,7 +64,6 @@ struct sbpp_softc { struct spif_softc { struct device sc_dev; /* base device */ - struct sbusdev sc_sd; /* sbus device */ void *sc_stcih; /* stc interrupt vector */ void *sc_ppcih; /* ppc interrut vector */ void *sc_softih; /* soft interrupt vector */ diff --git a/sys/dev/sbus/tvtwo.c b/sys/dev/sbus/tvtwo.c index 5184999be56..accc8ddcd82 100644 --- a/sys/dev/sbus/tvtwo.c +++ b/sys/dev/sbus/tvtwo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tvtwo.c,v 1.8 2006/02/12 13:18:09 miod Exp $ */ +/* $OpenBSD: tvtwo.c,v 1.9 2006/06/02 20:00:56 miod Exp $ */ /* * Copyright (c) 2003, 2006, Miodrag Vallat. * All rights reserved. @@ -121,7 +121,6 @@ /* per-display variables */ struct tvtwo_softc { struct sunfb sc_sunfb; /* common base device */ - struct sbusdev sc_sd; /* sbus device */ bus_space_tag_t sc_bustag; bus_addr_t sc_paddr; @@ -290,8 +289,6 @@ tvtwoattach(struct device *parent, struct device *self, void *args) fbwscons_console_init(&sc->sc_sunfb, -1); } - sbus_establish(&sc->sc_sd, &sc->sc_sunfb.sf_dev); - printf("%s: %dx%d\n", self->dv_xname, sc->sc_sunfb.sf_width, sc->sc_sunfb.sf_height); diff --git a/sys/dev/sbus/vigra.c b/sys/dev/sbus/vigra.c index 64a79396b3b..a059630b8a1 100644 --- a/sys/dev/sbus/vigra.c +++ b/sys/dev/sbus/vigra.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vigra.c,v 1.8 2005/03/08 21:35:04 miod Exp $ */ +/* $OpenBSD: vigra.c,v 1.9 2006/06/02 20:00:56 miod Exp $ */ /* * Copyright (c) 2002, 2003, Miodrag Vallat. @@ -175,7 +175,6 @@ union vigracmap { /* per-display variables */ struct vigra_softc { struct sunfb sc_sunfb; /* common base part */ - struct sbusdev sc_sd; /* sbus device */ bus_space_tag_t sc_bustag; bus_addr_t sc_paddr; volatile struct csregs *sc_regs;/* control registers */ @@ -353,8 +352,6 @@ vigraattach(struct device *parent, struct device *self, void *args) fbwscons_console_init(&sc->sc_sunfb, row); } - sbus_establish(&sc->sc_sd, &sc->sc_sunfb.sf_dev); - fbwscons_attach(&sc->sc_sunfb, &vigra_accessops, isconsole); } diff --git a/sys/dev/sbus/xbox.c b/sys/dev/sbus/xbox.c index acb55703671..35b52581423 100644 --- a/sys/dev/sbus/xbox.c +++ b/sys/dev/sbus/xbox.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xbox.c,v 1.2 2006/03/04 12:38:59 miod Exp $ */ +/* $OpenBSD: xbox.c,v 1.3 2006/06/02 20:00:56 miod Exp $ */ /* * Copyright (c) 1999 Jason L. Wright (jason@thought.net) @@ -114,8 +114,6 @@ xboxattach(struct device *parent, struct device *self, void *aux) bus_space_unmap(sa->sa_bustag, write0, sa->sa_reg[0].sbr_size); - sbus_establish(&sc->sc_sd, &sc->sc_dev); - printf("\n"); if (xbox_fix_range(sc, (struct sbus_softc *)parent) != 0) diff --git a/sys/dev/sbus/xboxvar.h b/sys/dev/sbus/xboxvar.h index dc2ec0a8cf2..93d43bf8996 100644 --- a/sys/dev/sbus/xboxvar.h +++ b/sys/dev/sbus/xboxvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: xboxvar.h,v 1.1 2005/03/05 01:44:52 miod Exp $ */ +/* $OpenBSD: xboxvar.h,v 1.2 2006/06/02 20:00:56 miod Exp $ */ /* * Copyright (c) 1999 Jason L. Wright (jason@thought.net) @@ -35,7 +35,6 @@ struct xbox_attach_args { struct xbox_softc { struct device sc_dev; /* base device */ - struct sbusdev sc_sd; /* sbus device */ u_int32_t sc_key; /* device key */ int sc_node; /* sbus node */ int sc_attached; /* has sbus attached? */ diff --git a/sys/dev/sbus/zx.c b/sys/dev/sbus/zx.c index 6071afd1a4d..bc8c19e5749 100644 --- a/sys/dev/sbus/zx.c +++ b/sys/dev/sbus/zx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zx.c,v 1.7 2006/03/04 10:26:54 miod Exp $ */ +/* $OpenBSD: zx.c,v 1.8 2006/06/02 20:00:56 miod Exp $ */ /* $NetBSD: zx.c,v 1.5 2002/10/02 16:52:46 thorpej Exp $ */ /* @@ -113,7 +113,6 @@ struct zx_cmap { struct zx_softc { struct sunfb sc_sunfb; - struct sbusdev sc_sd; bus_space_tag_t sc_bustag; bus_addr_t sc_paddr; @@ -317,8 +316,6 @@ zx_attach(struct device *parent, struct device *self, void *args) /* enable video */ zx_burner(sc, 1, 0); - sbus_establish(&sc->sc_sd, &sc->sc_sunfb.sf_dev); - fbwscons_attach(&sc->sc_sunfb, &zx_accessops, isconsole); } |