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/arch/sparc64/dev | |
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/arch/sparc64/dev')
-rw-r--r-- | sys/arch/sparc64/dev/ce4231var.h | 3 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/sbus.c | 60 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/sbusvar.h | 3 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/stp_sbus.c | 6 |
4 files changed, 4 insertions, 68 deletions
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; |