Remove struct sbusdev and related functions sbus_establish() and sbusreset().

They are derived from 4.4BSD/sparc and have been there since initial import
of NetBSD/sparc in 1993, but the struct sbusdev is almost unused for years,
nothing calls sbusreset(), and all (*sd->sd_reset)() functions look bogus.

Suggested by mrg@ and martin@, and tested on SS1+ and SS20.
This commit is contained in:
tsutsui 2009-09-17 16:28:12 +00:00
parent 87aae92eeb
commit 12ad76b18c
39 changed files with 76 additions and 363 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: sbus.c,v 1.72 2009/03/18 16:00:14 cegger Exp $ */
/* $NetBSD: sbus.c,v 1.73 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sbus.c,v 1.72 2009/03/18 16:00:14 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: sbus.c,v 1.73 2009/09/17 16:28:12 tsutsui Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
@ -509,60 +509,6 @@ sbus_bus_addr(bus_space_tag_t t, u_int btype, u_int offset)
}
/*
* Each attached device calls sbus_establish after it initializes
* its sbusdev portion.
*/
void
sbus_establish(struct sbusdev *sd, device_t dev)
{
register struct sbus_softc *sc;
register device_t 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 = device_parent(dev); ; curdev = device_parent(curdev)) {
if ((curdev == NULL) || (device_xname(curdev) == NULL))
panic("sbus_establish: can't find sbus parent for %s",
device_xname(dev)
? device_xname(dev)
: "<unknown>" );
if (strncmp(device_xname(curdev), "sbus", 4) == 0)
break;
}
sc = device_private(curdev);
sd->sd_dev = dev;
sd->sd_bchain = sc->sc_sbdev;
sc->sc_sbdev = sd;
}
/*
* Reset the given sbus. (???)
*/
void
sbusreset(int sbus)
{
register struct sbusdev *sd;
struct sbus_softc *sc = device_lookup_private(&sbus_cd, sbus);
device_t dev;
printf("reset %s:", device_xname(sc->sc_dev));
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", device_xname(dev));
}
}
}
/*
* Get interrupt attributes for an Sbus device.
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: sbusvar.h,v 1.19 2008/05/17 18:11:32 macallan Exp $ */
/* $NetBSD: sbusvar.h,v 1.20 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -80,7 +80,6 @@ struct sbus_softc {
bus_dma_tag_t sc_dmatag;
bus_space_handle_t sc_bh; /* SBus control registers */
int sc_clockfreq; /* clock frequency (in Hz) */
struct sbusdev *sc_sbdev; /* list of all children */
int sc_burst; /* burst transfer sizes supported */
/* MD fields follow here */

View File

@ -1,5 +1,5 @@
/* $OpenBSD: ts102.c,v 1.14 2005/01/27 17:03:23 millert Exp $ */
/* $NetBSD: ts102.c,v 1.13 2008/08/04 03:14:43 macallan Exp $ */
/* $NetBSD: ts102.c,v 1.14 2009/09/17 16:28:12 tsutsui Exp $ */
/*
* Copyright (c) 2003, 2004, Miodrag Vallat.
* Copyright (c) 2005, Michael Lorenz.
@ -137,7 +137,6 @@ struct tslot_data {
struct tslot_softc {
device_t sc_dev;
struct sbusdev sc_sd;
bus_space_tag_t sc_bustag; /* socket control io */
bus_space_handle_t sc_regh; /* space */
@ -337,8 +336,6 @@ tslot_attach(device_t parent, device_t self, void *args)
tag->sparc_write_4 = ts102_write_4;
tag->sparc_write_8 = ts102_write_8;
sbus_establish(&sc->sc_sd, self);
bus_intr_establish(sa->sa_bustag, sa->sa_intr[0].oi_pri,
IPL_NONE, tslot_intr, sc);

View File

@ -1,4 +1,4 @@
/* $NetBSD: sbus.c,v 1.84 2009/05/17 01:28:27 tsutsui Exp $ */
/* $NetBSD: sbus.c,v 1.85 2009/09/17 16:28:12 tsutsui Exp $ */
/*
* Copyright (c) 1999-2002 Eduardo Horvath
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sbus.c,v 1.84 2009/05/17 01:28:27 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: sbus.c,v 1.85 2009/09/17 16:28:12 tsutsui Exp $");
#include "opt_ddb.h"
@ -407,61 +407,6 @@ sbus_bus_addr(bus_space_tag_t t, u_int btype, u_int offset)
}
/*
* Each attached device calls sbus_establish after it initializes
* its sbusdev portion.
*/
void
sbus_establish(struct sbusdev *sd, device_t dev)
{
register struct sbus_softc *sc;
register device_t 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 = device_parent(dev); ; curdev = device_parent(curdev)) {
if ((curdev == NULL) || (device_xname(curdev) == NULL))
panic("sbus_establish: can't find sbus parent for %s",
device_xname(dev)
? device_xname(dev)
: "<unknown>" );
if (strncmp(device_xname(curdev), "sbus", 4) == 0)
break;
}
sc = device_private(curdev);
sd->sd_dev = dev;
sd->sd_bchain = sc->sc_sbdev;
sc->sc_sbdev = sd;
}
/*
* Reset the given sbus.
*/
void
sbusreset(int sbus)
{
register struct sbusdev *sd;
struct sbus_softc *sc = device_lookup_private(&sbus_cd, sbus);
device_t dev;
printf("reset %s:", device_xname(sc->sc_dev));
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", device_xname(dev));
}
}
/* Reload iommu regs */
iommu_reset(&sc->sc_is);
}
/*
* Handle an overtemp situation.
*

View File

@ -1,4 +1,4 @@
/* $NetBSD: sbusvar.h,v 1.16 2009/05/17 01:28:27 tsutsui Exp $ */
/* $NetBSD: sbusvar.h,v 1.17 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -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 */
int sc_burst; /* burst transfer sizes supported */
int *sc_intr2ipl; /* Interrupt level translation */
int *sc_intr_compat;/* `intr' property to sbus compat */

View File

@ -1,4 +1,4 @@
/* $NetBSD: agten.c,v 1.20 2009/08/20 02:29:16 macallan Exp $ */
/* $NetBSD: agten.c,v 1.21 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 2007 Michael Lorenz
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: agten.c,v 1.20 2009/08/20 02:29:16 macallan Exp $");
__KERNEL_RCSID(0, "$NetBSD: agten.c,v 1.21 2009/09/17 16:28:12 tsutsui Exp $");
/*
* a driver for the Fujitsu AG-10e SBus framebuffer
@ -85,7 +85,6 @@ static void agten_init_screen(void *, struct vcons_screen *, int, long *);
struct agten_softc {
device_t sc_dev; /* base device */
struct sbusdev sc_sd; /* sbus device */
struct fbdevice sc_fb; /* frame buffer device */
struct vcons_screen sc_console_screen;
@ -282,8 +281,6 @@ agten_attach(device_t parent, device_t dev, void *aux)
sc->sc_glint_regs = sbus_bus_addr(sc->sc_bustag,
sa->sa_reg[0].oa_space, sa->sa_reg[0].oa_base + reg);
sbus_establish(&sc->sc_sd, sc->sc_dev);
#if 0
bus_intr_establish(sc->sc_bustag, sa->sa_pri, IPL_BIO,
agten_intr, sc);

View File

@ -1,4 +1,4 @@
/* $NetBSD: be.c,v 1.65 2009/05/12 14:43:59 cegger Exp $ */
/* $NetBSD: be.c,v 1.66 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: be.c,v 1.65 2009/05/12 14:43:59 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: be.c,v 1.66 2009/09/17 16:28:12 tsutsui Exp $");
#include "opt_ddb.h"
#include "opt_inet.h"
@ -115,7 +115,6 @@ __KERNEL_RCSID(0, "$NetBSD: be.c,v 1.65 2009/05/12 14:43:59 cegger Exp $");
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;

View File

@ -1,4 +1,4 @@
/* $NetBSD: bpp.c,v 1.38 2008/04/28 20:23:57 martin Exp $ */
/* $NetBSD: bpp.c,v 1.39 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: bpp.c,v 1.38 2008/04/28 20:23:57 martin Exp $");
__KERNEL_RCSID(0, "$NetBSD: bpp.c,v 1.39 2009/09/17 16:28:12 tsutsui Exp $");
#include <sys/param.h>
#include <sys/ioctl.h>
@ -87,7 +87,6 @@ struct hwstate {
struct bpp_softc {
struct lsi64854_softc sc_lsi64854; /* base device */
struct sbusdev sc_sd; /* sbus device */
size_t sc_bufsz; /* temp buffer */
uint8_t *sc_buf;
@ -189,10 +188,6 @@ bppattach(device_t parent, device_t self, void *aux)
sc->sc_burst = (burst & SBUS_BURST_32) ? 32 :
(burst & SBUS_BURST_16) ? 16 : 0;
/* Join the Sbus device family */
dsc->sc_sd.sd_reset = NULL;
sbus_establish(&dsc->sc_sd, self);
/* Initialize the DMA channel */
sc->sc_channel = L64854_CHANNEL_PP;
lsi64854_attach(sc);

View File

@ -1,4 +1,4 @@
/* $NetBSD: bwtwo_sbus.c,v 1.25 2009/05/12 14:43:59 cegger Exp $ */
/* $NetBSD: bwtwo_sbus.c,v 1.26 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: bwtwo_sbus.c,v 1.25 2009/05/12 14:43:59 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: bwtwo_sbus.c,v 1.26 2009/09/17 16:28:12 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -106,13 +106,7 @@ __KERNEL_RCSID(0, "$NetBSD: bwtwo_sbus.c,v 1.25 2009/05/12 14:43:59 cegger Exp $
static void bwtwoattach_sbus (device_t, device_t, void *);
static int bwtwomatch_sbus (device_t, cfdata_t, void *);
/* Allocate an `sbusdev' in addition to the bwtwo softc */
struct bwtwo_sbus_softc {
struct bwtwo_softc bss_softc;
struct sbusdev bss_sd;
};
CFATTACH_DECL(bwtwo_sbus, sizeof(struct bwtwo_sbus_softc),
CFATTACH_DECL(bwtwo_sbus, sizeof(struct bwtwo_softc),
bwtwomatch_sbus, bwtwoattach_sbus, NULL, NULL);
static int bwtwo_get_video (struct bwtwo_softc *);
@ -137,7 +131,6 @@ void
bwtwoattach_sbus(device_t parent, device_t self, void *args)
{
struct bwtwo_softc *sc = (struct bwtwo_softc *)self;
struct sbusdev *sd = &((struct bwtwo_sbus_softc *)self)->bss_sd;
struct sbus_attach_args *sa = args;
struct fbdevice *fb = &sc->sc_fb;
bus_space_handle_t bh;
@ -194,7 +187,6 @@ bwtwoattach_sbus(device_t parent, device_t self, void *args)
sc->sc_fb.fb_pixels = (char *)bus_space_vaddr(sa->sa_bustag, bh);
}
sbus_establish(sd, &sc->sc_dev);
bwtwoattach(sc, name, isconsole);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: cgsix_sbus.c,v 1.29 2009/05/26 03:32:51 macallan Exp $ */
/* $NetBSD: cgsix_sbus.c,v 1.30 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cgsix_sbus.c,v 1.29 2009/05/26 03:32:51 macallan Exp $");
__KERNEL_RCSID(0, "$NetBSD: cgsix_sbus.c,v 1.30 2009/09/17 16:28:12 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -67,13 +67,7 @@ __KERNEL_RCSID(0, "$NetBSD: cgsix_sbus.c,v 1.29 2009/05/26 03:32:51 macallan Exp
static int cgsixmatch(device_t, cfdata_t, void *);
static void cgsixattach(device_t, device_t, void *);
/* Allocate an `sbusdev' in addition to the cgsix softc */
struct cgsix_sbus_softc {
struct cgsix_softc bss_softc;
struct sbusdev bss_sd;
};
CFATTACH_DECL_NEW(cgsix_sbus, sizeof(struct cgsix_sbus_softc),
CFATTACH_DECL_NEW(cgsix_sbus, sizeof(struct cgsix_softc),
cgsixmatch, cgsixattach, NULL, NULL);
/*
@ -94,9 +88,7 @@ cgsixmatch(device_t parent, cfdata_t cf, void *aux)
void
cgsixattach(device_t parent, device_t self, void *aux)
{
struct cgsix_sbus_softc *ssc = device_private(self);
struct cgsix_softc *sc = &ssc->bss_softc;
struct sbusdev *sd = &ssc->bss_sd;
struct cgsix_softc *sc = device_private(self);
struct sbus_attach_args *sa = aux;
struct fbdevice *fb = &sc->sc_fb;
int node, isconsole;
@ -172,7 +164,6 @@ cgsixattach(device_t parent, device_t self, void *aux)
}
sc->sc_fbc = (struct cg6_fbc *)bus_space_vaddr(sa->sa_bustag, bh);
sbus_establish(sd, sc->sc_dev);
name = prom_getpropstring(node, "model");
isconsole = fb_is_console(node);

View File

@ -1,4 +1,4 @@
/* $NetBSD: cgthree_sbus.c,v 1.26 2009/09/16 13:05:07 tsutsui Exp $ */
/* $NetBSD: cgthree_sbus.c,v 1.27 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -78,7 +78,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cgthree_sbus.c,v 1.26 2009/09/16 13:05:07 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: cgthree_sbus.c,v 1.27 2009/09/17 16:28:12 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -103,12 +103,6 @@ __KERNEL_RCSID(0, "$NetBSD: cgthree_sbus.c,v 1.26 2009/09/16 13:05:07 tsutsui Ex
#include <dev/sbus/sbusvar.h>
/* Allocate an `sbusdev' in addition to the cgthree softc */
struct cgthree_sbus_softc {
struct cgthree_softc bss_softc;
struct sbusdev bss_sd;
};
/* autoconfiguration driver */
static int cgthreematch_sbus(device_t, cfdata_t, void *);
@ -138,7 +132,6 @@ void
cgthreeattach_sbus(device_t parent, device_t self, void *args)
{
struct cgthree_softc *sc = (struct cgthree_softc *)self;
struct sbusdev *sd = &((struct cgthree_sbus_softc *)self)->bss_sd;
struct sbus_attach_args *sa = args;
struct fbdevice *fb = &sc->sc_fb;
int node = sa->sa_node;
@ -193,6 +186,5 @@ cgthreeattach_sbus(device_t parent, device_t self, void *args)
fb->fb_pixels = (char *)bus_space_vaddr(sa->sa_bustag, bh);
}
sbus_establish(sd, &sc->sc_dev);
cgthreeattach(sc, name, isconsole);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: cs4231_sbus.c,v 1.45 2009/05/12 14:43:59 cegger Exp $ */
/* $NetBSD: cs4231_sbus.c,v 1.46 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 1998, 1999, 2002, 2007 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cs4231_sbus.c,v 1.45 2009/05/12 14:43:59 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: cs4231_sbus.c,v 1.46 2009/09/17 16:28:12 tsutsui Exp $");
#include "audio.h"
#if NAUDIO > 0
@ -73,7 +73,6 @@ struct cs4231_sbus_softc {
void *sc_pint;
void *sc_rint;
struct sbusdev sc_sd; /* sbus device */
bus_space_tag_t sc_bt; /* DMA controller tag */
bus_space_handle_t sc_bh; /* DMA controller registers */
};
@ -188,8 +187,6 @@ cs4231_sbus_attach(device_t parent, device_t self, void *aux)
cs4231_common_attach(sc, bh);
printf("\n");
sbus_establish(&sbsc->sc_sd, &sc->sc_ad1848.sc_dev);
/* Establish interrupt channel */
if (sa->sa_nintr)
bus_intr_establish(sa->sa_bustag,

View File

@ -1,4 +1,4 @@
/* $NetBSD: dbri.c,v 1.23 2009/05/16 18:24:44 martin Exp $ */
/* $NetBSD: dbri.c,v 1.24 2009/09/17 16:28:12 tsutsui Exp $ */
/*
* Copyright (C) 1997 Rudolf Koenig (rfkoenig@immd4.informatik.uni-erlangen.de)
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: dbri.c,v 1.23 2009/05/16 18:24:44 martin Exp $");
__KERNEL_RCSID(0, "$NetBSD: dbri.c,v 1.24 2009/09/17 16:28:12 tsutsui Exp $");
#include "audio.h"
#if NAUDIO > 0
@ -366,8 +366,6 @@ dbri_attach_sbus(device_t parent, device_t self, void *aux)
sc->sc_dmabase = sc->sc_dmamap->dm_segs[0].ds_addr;
sc->sc_bufsiz = size;
sbus_establish(&sc->sc_sd, sc->sc_dev);
bus_intr_establish(sa->sa_bustag, sa->sa_pri, IPL_SCHED, dbri_intr,
sc);

View File

@ -1,4 +1,4 @@
/* $NetBSD: dbrivar.h,v 1.10 2008/05/16 15:38:20 macallan Exp $ */
/* $NetBSD: dbrivar.h,v 1.11 2009/09/17 16:28:12 tsutsui Exp $ */
/*
* Copyright (C) 1997 Rudolf Koenig (rfkoenig@immd4.informatik.uni-erlangen.de)
@ -116,7 +116,6 @@ struct dbri_dma {
struct dbri_softc {
device_t sc_dev; /* base device */
struct sbusdev sc_sd; /* sbus device */
bus_space_handle_t sc_ioh;
bus_space_tag_t sc_iot;
/* DMA buffer for sending commands to the chip */

View File

@ -1,4 +1,4 @@
/* $NetBSD: dma_sbus.c,v 1.34 2009/05/12 13:20:05 cegger Exp $ */
/* $NetBSD: dma_sbus.c,v 1.35 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: dma_sbus.c,v 1.34 2009/05/12 13:20:05 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: dma_sbus.c,v 1.35 2009/09/17 16:28:12 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -79,7 +79,7 @@ __KERNEL_RCSID(0, "$NetBSD: dma_sbus.c,v 1.34 2009/05/12 13:20:05 cegger Exp $")
struct dma_softc {
struct lsi64854_softc sc_lsi64854; /* base device */
struct sbusdev sc_sd; /* sbus device */
/* possible sbus specific stuff here */
};
int dmamatch_sbus(device_t, cfdata_t, void *);
@ -199,7 +199,6 @@ dmaattach_sbus(device_t parent, device_t self, void *aux)
sc->sc_channel = L64854_CHANNEL_SCSI;
}
sbus_establish(&dsc->sc_sd, self);
if ((sbt = bus_space_tag_alloc(sc->sc_bustag, dsc)) == NULL) {
aprint_error(": out of memory\n");
return;

View File

@ -1,4 +1,4 @@
/* $NetBSD: esp_sbus.c,v 1.50 2009/09/08 18:31:36 tsutsui Exp $ */
/* $NetBSD: esp_sbus.c,v 1.51 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: esp_sbus.c,v 1.50 2009/09/08 18:31:36 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: esp_sbus.c,v 1.51 2009/09/17 16:28:12 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -62,7 +62,6 @@ __KERNEL_RCSID(0, "$NetBSD: esp_sbus.c,v 1.50 2009/09/08 18:31:36 tsutsui Exp $"
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;
@ -101,8 +100,6 @@ static void esp_dma_go(struct ncr53c9x_softc *);
static void esp_dma_stop(struct ncr53c9x_softc *);
static int esp_dma_isactive(struct ncr53c9x_softc *);
static void esp_sbus_reset(device_t);
#ifdef DDB
static void esp_init_ddb_cmds(void);
#endif
@ -288,10 +285,6 @@ espattach_sbus(device_t parent, device_t self, void *aux)
esc->sc_pri = sa->sa_pri;
/* add me to the sbus structures */
esc->sc_sd.sd_reset = esp_sbus_reset;
sbus_establish(&esc->sc_sd, self);
espattach(esc, &esp_sbus_glue);
return;
@ -348,10 +341,6 @@ espattach_sbus(device_t parent, device_t self, void *aux)
esc->sc_pri = sa->sa_pri;
/* add me to the sbus structures */
esc->sc_sd.sd_reset = esp_sbus_reset;
sbus_establish(&esc->sc_sd, self);
if (strcmp("ptscII", sa->sa_name) == 0) {
espattach(esc, &esp_sbus_glue1);
} else {
@ -408,10 +397,6 @@ espattach_dma(device_t parent, device_t self, void *aux)
esc->sc_pri = sa->sa_pri;
/* SBus is grandparent, but sbus_establish() looks for it properly */
esc->sc_sd.sd_reset = esp_sbus_reset;
sbus_establish(&esc->sc_sd, self);
espattach(esc, &esp_sbus_glue);
}
@ -702,15 +687,6 @@ esp_dma_isactive(struct ncr53c9x_softc *sc)
return DMA_ISACTIVE(esc->sc_dma);
}
void
esp_sbus_reset(device_t self)
{
struct esp_softc *esc = device_private(self);
struct ncr53c9x_softc *sc = &esc->sc_ncr53c9x;
ncr53c9x_reset(sc);
}
#ifdef DDB
#include <machine/db_machdep.h>
#include <ddb/db_output.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: genfb_sbus.c,v 1.7 2009/05/12 14:43:59 cegger Exp $ */
/* $NetBSD: genfb_sbus.c,v 1.8 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 2007 Michael Lorenz
@ -29,7 +29,7 @@
/* an SBus frontend for the generic fb console driver */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: genfb_sbus.c,v 1.7 2009/05/12 14:43:59 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: genfb_sbus.c,v 1.8 2009/09/17 16:28:12 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -52,7 +52,6 @@ __KERNEL_RCSID(0, "$NetBSD: genfb_sbus.c,v 1.7 2009/05/12 14:43:59 cegger Exp $"
struct genfb_sbus_softc {
struct genfb_softc sc_gen;
struct sbusdev sc_sd;
bus_space_tag_t sc_tag;
paddr_t sc_paddr;
};
@ -91,7 +90,6 @@ static void
genfb_attach_sbus(device_t parent, device_t self, void *args)
{
struct genfb_sbus_softc *sc = (struct genfb_sbus_softc *)self;
struct sbusdev *sd = &sc->sc_sd;
struct sbus_attach_args *sa = args;
struct genfb_ops ops;
prop_dictionary_t dict;
@ -149,7 +147,6 @@ genfb_attach_sbus(device_t parent, device_t self, void *args)
}
sc->sc_gen.sc_fbaddr = (void *)bus_space_vaddr(sa->sa_bustag, bh);
sbus_establish(sd, self);
ops.genfb_ioctl = genfb_ioctl_sbus;
ops.genfb_mmap = genfb_mmap_sbus;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_en.c,v 1.25 2009/05/12 14:43:59 cegger Exp $ */
/* $NetBSD: if_en.c,v 1.26 2009/09/17 16:28:12 tsutsui Exp $ */
/*
*
@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_en.c,v 1.25 2009/05/12 14:43:59 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_en.c,v 1.26 2009/09/17 16:28:12 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -69,10 +69,9 @@ __KERNEL_RCSID(0, "$NetBSD: if_en.c,v 1.25 2009/05/12 14:43:59 cegger Exp $");
*/
struct en_sbus_softc {
/* bus independent stuff */
struct en_softc esc; /* includes "device" structure */
struct en_softc sc_en; /* includes "device" structure */
/* sbus glue */
struct sbusdev sc_sd; /* sbus device */
};
@ -119,8 +118,8 @@ static void
en_sbus_attach(device_t parent, device_t self, void *aux)
{
struct sbus_attach_args *sa = aux;
struct en_softc *sc = (void *)self;
struct en_sbus_softc *scs = (void *)self;
struct en_sbus_softc *ssc = (void *)self;
struct en_softc *sc = &ssc->sc_en;
printf("\n");
@ -140,8 +139,6 @@ en_sbus_attach(device_t parent, device_t self, void *aux)
sc->ipl = sa->sa_pri; /* appropriate? */
sbus_establish(&scs->sc_sd, &sc->sc_dev);
/*
* done SBUS specific stuff
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_gem_sbus.c,v 1.12 2009/08/04 09:26:26 martin Exp $ */
/* $NetBSD: if_gem_sbus.c,v 1.13 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_gem_sbus.c,v 1.12 2009/08/04 09:26:26 martin Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_gem_sbus.c,v 1.13 2009/09/17 16:28:12 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -62,7 +62,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_gem_sbus.c,v 1.12 2009/08/04 09:26:26 martin Exp
struct gem_sbus_softc {
struct gem_softc gsc_gem; /* GEM device */
struct sbusdev gsc_sd;
void *gsc_ih;
bus_space_handle_t gsc_sbus_regs_h;
};
@ -124,7 +123,6 @@ gemattach_sbus(device_t parent, device_t self, void *aux)
aprint_error_dev(self, "cannot map registers\n");
return;
}
sbus_establish(&gsc->gsc_sd, self);
prom_getether(sa->sa_node, enaddr);
if (!strcmp("serdes", prom_getpropstring(sa->sa_node, "shared-pins")))

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_hme_sbus.c,v 1.32 2009/09/08 18:15:17 tsutsui Exp $ */
/* $NetBSD: if_hme_sbus.c,v 1.33 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_hme_sbus.c,v 1.32 2009/09/08 18:15:17 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_hme_sbus.c,v 1.33 2009/09/17 16:28:12 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -60,14 +60,12 @@ __KERNEL_RCSID(0, "$NetBSD: if_hme_sbus.c,v 1.32 2009/09/08 18:15:17 tsutsui Exp
struct hmesbus_softc {
struct hme_softc hsc_hme; /* HME device */
struct sbusdev hsc_sbus; /* SBus device */
/* sbus specific stuff here */
};
int hmematch_sbus(device_t, cfdata_t, void *);
void hmeattach_sbus(device_t, device_t, void *);
static void hme_sbus_reset(device_t);
CFATTACH_DECL_NEW(hme_sbus, sizeof(struct hmesbus_softc),
hmematch_sbus, hmeattach_sbus, NULL, NULL);
@ -88,7 +86,6 @@ hmeattach_sbus(device_t parent, device_t self, void *aux)
struct hmesbus_softc *hsc = device_private(self);
struct hme_softc *sc = &hsc->hsc_hme;
struct sbus_softc *sbsc = device_private(parent);
struct sbusdev *sd = &hsc->hsc_sbus;
uint32_t burst, sbusburst;
int node;
@ -159,9 +156,6 @@ hmeattach_sbus(device_t parent, device_t self, void *aux)
return;
}
sd->sd_reset = hme_sbus_reset;
sbus_establish(sd, self);
prom_getether(node, sc->sc_enaddr);
/*
@ -192,12 +186,3 @@ hmeattach_sbus(device_t parent, device_t self, void *aux)
(void)bus_intr_establish(sa->sa_bustag, sa->sa_pri, IPL_NET,
hme_intr, sc);
}
void
hme_sbus_reset(device_t self)
{
struct hmesbus_softc *hsc = device_private(self);
struct hme_softc *sc = &hsc->hsc_hme;
hme_reset(sc);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_le.c,v 1.38 2009/09/16 11:17:19 tsutsui Exp $ */
/* $NetBSD: if_le.c,v 1.39 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_le.c,v 1.38 2009/09/16 11:17:19 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_le.c,v 1.39 2009/09/17 16:28:12 tsutsui Exp $");
#include "opt_inet.h"
#include "bpfilter.h"
@ -70,7 +70,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_le.c,v 1.38 2009/09/16 11:17:19 tsutsui Exp $");
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;
@ -82,8 +81,6 @@ struct le_softc {
int lematch_sbus(device_t, cfdata_t, void *);
void leattach_sbus(device_t, device_t, void *);
static void le_sbus_reset(device_t);
/*
* Media types supported.
*/
@ -217,9 +214,6 @@ leattach_sbus(device_t parent, device_t self, void *aux)
}
}
lesc->sc_sd.sd_reset = le_sbus_reset;
sbus_establish(&lesc->sc_sd, self);
if (sc->sc_mem == 0) {
bus_dma_segment_t seg;
int rseg, error;
@ -290,12 +284,3 @@ leattach_sbus(device_t parent, device_t self, void *aux)
(void)bus_intr_establish(lesc->sc_bustag, sa->sa_pri,
IPL_NET, am7990_intr, sc);
}
void
le_sbus_reset(device_t self)
{
struct le_softc *lesc = device_private(self);
struct lance_softc *sc = &lesc->sc_am7990.lsc;
lance_reset(sc);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_le_lebuffer.c,v 1.26 2009/09/08 18:31:36 tsutsui Exp $ */
/* $NetBSD: if_le_lebuffer.c,v 1.27 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_le_lebuffer.c,v 1.26 2009/09/08 18:31:36 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_le_lebuffer.c,v 1.27 2009/09/17 16:28:12 tsutsui Exp $");
#include "opt_inet.h"
#include "bpfilter.h"
@ -75,7 +75,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_le_lebuffer.c,v 1.26 2009/09/08 18:31:36 tsutsui
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 */
@ -85,8 +84,6 @@ struct le_softc {
int lematch_lebuffer(device_t, cfdata_t, void *);
void leattach_lebuffer(device_t, device_t, void *);
static void le_lebuffer_reset(device_t);
/*
* Media types supported.
*/
@ -175,10 +172,6 @@ leattach_lebuffer(device_t parent, device_t self, void *aux)
sc->sc_conf3 = prom_getpropint(sa->sa_node, "busmaster-regval",
LE_C3_BSWP | LE_C3_ACON | LE_C3_BCON);
/* SBus is grandparent, but sbus_establish() looks for it properly */
lesc->sc_sd.sd_reset = le_lebuffer_reset;
sbus_establish(&lesc->sc_sd, self);
sc->sc_supmedia = lemedia;
sc->sc_nsupmedia = NLEMEDIA;
sc->sc_defaultmedia = lemedia[0];
@ -201,12 +194,3 @@ leattach_lebuffer(device_t parent, device_t self, void *aux)
(void)bus_intr_establish(lesc->sc_bustag, sa->sa_pri,
IPL_NET, am7990_intr, sc);
}
void
le_lebuffer_reset(device_t self)
{
struct le_softc *lesc = device_private(self);
struct lance_softc *sc = &lesc->sc_am7990.lsc;
lance_reset(sc);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_le_ledma.c,v 1.33 2009/09/08 18:31:36 tsutsui Exp $ */
/* $NetBSD: if_le_ledma.c,v 1.34 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_le_ledma.c,v 1.33 2009/09/08 18:31:36 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_le_ledma.c,v 1.34 2009/09/17 16:28:12 tsutsui Exp $");
#include "opt_inet.h"
#include "bpfilter.h"
@ -77,7 +77,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_le_ledma.c,v 1.33 2009/09/08 18:31:36 tsutsui Exp
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 */
@ -93,8 +92,6 @@ struct le_softc {
int lematch_ledma(device_t, cfdata_t, void *);
void leattach_ledma(device_t, device_t, void *);
static void le_ledma_reset(device_t);
/*
* Media types supported by the Sun4m.
*/
@ -391,10 +388,6 @@ leattach_ledma(device_t parent, device_t self, void *aux)
sc->sc_conf3 = LE_C3_BSWP | LE_C3_ACON | LE_C3_BCON;
lesc->sc_lostcount = 0;
/* SBus is grandparent, but sbus_establish looks for it properly */
lesc->sc_sd.sd_reset = le_ledma_reset;
sbus_establish(&lesc->sc_sd, self);
sc->sc_mediachange = lemediachange;
sc->sc_mediastatus = lemediastatus;
sc->sc_supmedia = lemedia;
@ -425,12 +418,3 @@ leattach_ledma(device_t parent, device_t self, void *aux)
/* now initialize DMA */
lehwreset(sc);
}
void
le_ledma_reset(device_t self)
{
struct le_softc *lesc = device_private(self);
struct lance_softc *sc = &lesc->sc_am7990.lsc;
lance_reset(sc);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: isp_sbus.c,v 1.78 2009/09/07 13:39:19 tsutsui Exp $ */
/* $NetBSD: isp_sbus.c,v 1.79 2009/09/17 16:28:12 tsutsui Exp $ */
/*
* SBus specific probe and attach routines for Qlogic ISP SCSI adapters.
*
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: isp_sbus.c,v 1.78 2009/09/07 13:39:19 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: isp_sbus.c,v 1.79 2009/09/17 16:28:12 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -81,7 +81,6 @@ static const struct ispmdvec mdvec = {
struct isp_sbussoftc {
ispsoftc_t sbus_isp;
struct sbusdev sbus_sd;
sdparam sbus_dev;
struct scsipi_channel sbus_chan;
bus_space_tag_t sbus_bustag;
@ -202,7 +201,6 @@ isp_sbus_attach(device_t parent, device_t self, void *aux)
/* Establish interrupt channel */
bus_intr_establish(sbc->sbus_bustag, sbc->sbus_pri, IPL_BIO,
isp_sbus_intr, sbc);
sbus_establish(&sbc->sbus_sd, self);
/*
* Set up logging levels.

View File

@ -1,4 +1,4 @@
/* $NetBSD: lebuffer.c,v 1.33 2009/05/17 00:28:35 tsutsui Exp $ */
/* $NetBSD: lebuffer.c,v 1.34 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lebuffer.c,v 1.33 2009/05/17 00:28:35 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: lebuffer.c,v 1.34 2009/09/17 16:28:12 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -115,8 +115,6 @@ lebufattach(device_t parent, device_t self, void *aux)
/* Clamp at parent's burst sizes */
sc->sc_burst &= sbusburst;
sbus_establish(&sc->sc_sd, &sc->sc_dev);
printf(": %dK memory\n", sc->sc_bufsiz / 1024);
/* search through children */

View File

@ -1,4 +1,4 @@
/* $NetBSD: lebuffervar.h,v 1.6 2008/04/28 20:23:57 martin Exp $ */
/* $NetBSD: lebuffervar.h,v 1.7 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -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 */

View File

@ -1,4 +1,4 @@
/* $NetBSD: magma.c,v 1.52 2009/05/12 14:43:59 cegger Exp $ */
/* $NetBSD: magma.c,v 1.53 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 1998 Iain Hibbert
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: magma.c,v 1.52 2009/05/12 14:43:59 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: magma.c,v 1.53 2009/09/17 16:28:12 tsutsui Exp $");
#if 0
#define MAGMA_DEBUG
@ -454,8 +454,6 @@ magma_attach(device_t parent, device_t self, void *aux)
device_xname(self), chip, cd->cd_reg);
}
sbus_establish(&sc->ms_sd, &sc->ms_dev);
/* configure the children */
(void)config_found(self, mtty_match, NULL);
(void)config_found(self, mbpp_match, NULL);

View File

@ -1,4 +1,4 @@
/* $NetBSD: magmareg.h,v 1.15 2009/05/12 14:43:59 cegger Exp $ */
/* $NetBSD: magmareg.h,v 1.16 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 1998 Iain Hibbert
@ -98,7 +98,6 @@ struct cd1190 {
/* software state for each card */
struct magma_softc {
struct device ms_dev; /* required. must be first in softc */
struct sbusdev ms_sd; /* sbus device */
struct evcnt ms_intrcnt; /* statistics */
/* cd1400 chip info */

View File

@ -1,4 +1,4 @@
/* $NetBSD: p9100.c,v 1.47 2009/08/20 02:29:16 macallan Exp $ */
/* $NetBSD: p9100.c,v 1.48 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 1998, 2005, 2006 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: p9100.c,v 1.47 2009/08/20 02:29:16 macallan Exp $");
__KERNEL_RCSID(0, "$NetBSD: p9100.c,v 1.48 2009/09/17 16:28:12 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -98,7 +98,6 @@ struct pnozz_cursor {
/* per-display variables */
struct p9100_softc {
device_t sc_dev; /* base device */
struct sbusdev sc_sd; /* sbus device */
struct fbdevice sc_fb; /* frame buffer device */
bus_space_tag_t sc_bustag;
@ -396,7 +395,6 @@ p9100_sbus_attach(device_t parent, device_t self, void *args)
fb_setsize_obp(fb, fb->fb_type.fb_depth, sc->sc_width, sc->sc_height,
node);
sbus_establish(&sc->sc_sd, sc->sc_dev);
#if 0
bus_intr_establish(sc->sc_bustag, sa->sa_pri, IPL_BIO,
p9100_intr, sc);

View File

@ -1,4 +1,4 @@
/* $NetBSD: qe.c,v 1.51 2009/05/12 14:43:59 cegger Exp $ */
/* $NetBSD: qe.c,v 1.52 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: qe.c,v 1.51 2009/05/12 14:43:59 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: qe.c,v 1.52 2009/09/17 16:28:12 tsutsui Exp $");
#define QEDEBUG
@ -121,7 +121,6 @@ __KERNEL_RCSID(0, "$NetBSD: qe.c,v 1.51 2009/05/12 14:43:59 cegger Exp $");
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;

View File

@ -1,4 +1,4 @@
/* $NetBSD: qec.c,v 1.44 2009/05/17 00:28:35 tsutsui Exp $ */
/* $NetBSD: qec.c,v 1.45 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: qec.c,v 1.44 2009/05/17 00:28:35 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: qec.c,v 1.45 2009/09/17 16:28:12 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -163,8 +163,6 @@ qecattach(device_t parent, device_t 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 = bus_space_tag_alloc(sc->sc_bustag, sc);
if (sbt == NULL) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: qecvar.h,v 1.11 2008/04/28 20:23:57 martin Exp $ */
/* $NetBSD: qecvar.h,v 1.12 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -31,7 +31,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 openprom_intr *sc_intr; /* interrupt info */

View File

@ -1,4 +1,4 @@
/* $NetBSD: sbusvar.h,v 1.26 2008/05/17 18:09:03 macallan Exp $ */
/* $NetBSD: sbusvar.h,v 1.27 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -40,15 +40,6 @@
struct sbus_softc;
/*
* S-bus variables.
*/
struct sbusdev {
device_t sd_dev; /* backpointer to generic */
struct sbusdev *sd_bchain; /* forward link in bus chain */
void (*sd_reset)(device_t);
};
typedef u_int32_t sbus_slot_t;
typedef u_int32_t sbus_offset_t;
@ -82,8 +73,6 @@ void sbus_attach_common(struct sbus_softc *, const char *, int,
const char * const *);
int sbus_print(void *, const char *);
void sbus_establish(struct sbusdev *, device_t);
int sbus_setup_attach_args(
struct sbus_softc *,
bus_space_tag_t,
@ -106,7 +95,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 openprom_range *sc_range;
int sc_nrange;
int sc_burst; /* burst transfer sizes supported */

View File

@ -1,4 +1,4 @@
/* $NetBSD: sio16.c,v 1.21 2009/05/12 14:43:59 cegger Exp $ */
/* $NetBSD: sio16.c,v 1.22 2009/09/17 16:28:12 tsutsui Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sio16.c,v 1.21 2009/05/12 14:43:59 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: sio16.c,v 1.22 2009/09/17 16:28:12 tsutsui Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@ -73,7 +73,6 @@ static u_char sio16_ackfunc(void *, int who);
*/
struct sio16_softc {
struct device sc_dev; /* must be first */
struct sbusdev sc_sd; /* for sbus drivers */
/* sbus information */
bus_space_tag_t sc_tag; /* bus tag for below */
@ -206,9 +205,6 @@ sio16_attach(device_t parent, device_t self, void *aux)
return;
}
/* set up our sbus connections */
sbus_establish(&sc->sc_sd, &sc->sc_dev);
/* establish interrupt channel */
(void)bus_intr_establish(sa->sa_bustag, sa->sa_pri, IPL_TTY,
cd18xx_hardintr, sc);

View File

@ -1,4 +1,4 @@
/* $NetBSD: spifvar.h,v 1.2 2005/12/11 12:23:44 christos Exp $ */
/* $NetBSD: spifvar.h,v 1.3 2009/09/17 16:28:12 tsutsui Exp $ */
/* $OpenBSD: spifvar.h,v 1.3 2003/06/02 18:32:41 jason Exp $ */
/*
@ -65,7 +65,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 */

View File

@ -1,4 +1,4 @@
/* $NetBSD: stp4020.c,v 1.61 2009/05/12 14:43:59 cegger Exp $ */
/* $NetBSD: stp4020.c,v 1.62 2009/09/17 16:28:12 tsutsui Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: stp4020.c,v 1.61 2009/05/12 14:43:59 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: stp4020.c,v 1.62 2009/09/17 16:28:12 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -121,7 +121,6 @@ struct stp4020_socket {
struct stp4020_softc {
struct device sc_dev; /* Base device */
struct sbusdev sc_sd; /* SBus device */
pcmcia_chipset_tag_t sc_pct; /* Chipset methods */
struct lwp *event_thread; /* event handling thread */
@ -451,8 +450,6 @@ stp4020attach(device_t parent, device_t self, void *aux)
}
}
sbus_establish(&sc->sc_sd, &sc->sc_dev);
/* We only use one interrupt level. */
if (sa->sa_nintr > sbus_intno) {
bus_intr_establish(sa->sa_bustag,

View File

@ -1,4 +1,4 @@
/* $NetBSD: tcx.c,v 1.40 2009/08/26 22:36:07 macallan Exp $ */
/* $NetBSD: tcx.c,v 1.41 2009/09/17 16:28:13 tsutsui Exp $ */
/*
* Copyright (c) 1996, 1998, 2009 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tcx.c,v 1.40 2009/08/26 22:36:07 macallan Exp $");
__KERNEL_RCSID(0, "$NetBSD: tcx.c,v 1.41 2009/09/17 16:28:13 tsutsui Exp $");
/*
* define for cg8 emulation on S24 (24-bit version of tcx) for the SS5;
@ -84,7 +84,6 @@ __KERNEL_RCSID(0, "$NetBSD: tcx.c,v 1.40 2009/08/26 22:36:07 macallan Exp $");
/* per-display variables */
struct tcx_softc {
device_t sc_dev; /* base device */
struct sbusdev sc_sd; /* sbus device */
struct fbdevice sc_fb; /* frame buffer device */
bus_space_tag_t sc_bustag;
struct openprom_addr sc_physaddr[TCX_NREG];/* phys addr of h/w */
@ -377,7 +376,6 @@ tcxattach(device_t parent, device_t self, void *args)
} else
printf("\n");
sbus_establish(&sc->sc_sd, sc->sc_dev);
fb_attach(&sc->sc_fb, isconsole);
sc->sc_mode = WSDISPLAYIO_MODE_EMUL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: zx.c,v 1.30 2009/05/26 03:32:51 macallan Exp $ */
/* $NetBSD: zx.c,v 1.31 2009/09/17 16:28:13 tsutsui Exp $ */
/*
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: zx.c,v 1.30 2009/05/26 03:32:51 macallan Exp $");
__KERNEL_RCSID(0, "$NetBSD: zx.c,v 1.31 2009/09/17 16:28:13 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -294,7 +294,6 @@ zx_attach(device_t parent, device_t self, void *args)
printf(" (console)");
printf("\n");
sbus_establish(&sc->sc_sd, sc->sc_dv);
if (sa->sa_nintr != 0)
bus_intr_establish(bt, sa->sa_pri, IPL_NONE, zx_intr, sc);

View File

@ -1,4 +1,4 @@
/* $NetBSD: zxvar.h,v 1.4 2009/04/23 20:46:49 macallan Exp $ */
/* $NetBSD: zxvar.h,v 1.5 2009/09/17 16:28:13 tsutsui Exp $ */
/*
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -80,7 +80,6 @@
*/
struct zx_softc {
device_t sc_dv;
struct sbusdev sc_sd;
struct fbdevice sc_fb;
bus_space_tag_t sc_bt;