Remove unused struct abus stuff.
This commit is contained in:
parent
d71cfc62f0
commit
0aa05e92ff
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mainbus.c,v 1.20 2005/12/11 12:16:37 christos Exp $ */
|
||||
/* $NetBSD: mainbus.c,v 1.21 2006/06/25 16:46:15 tsutsui Exp $ */
|
||||
/* $OpenBSD: mainbus.c,v 1.4 1998/10/15 21:30:15 imp Exp $ */
|
||||
/* NetBSD: mainbus.c,v 1.3 1995/06/28 02:45:10 cgd Exp */
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.20 2005/12/11 12:16:37 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.21 2006/06/25 16:46:15 tsutsui Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -40,24 +40,14 @@ __KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.20 2005/12/11 12:16:37 christos Exp $"
|
||||
#include <machine/autoconf.h>
|
||||
#include <machine/platform.h>
|
||||
|
||||
struct mainbus_softc {
|
||||
struct device sc_dv;
|
||||
struct abus sc_bus;
|
||||
};
|
||||
|
||||
/* Definition of the mainbus driver. */
|
||||
static int mbmatch(struct device *, struct cfdata *, void *);
|
||||
static void mbattach(struct device *, struct device *, void *);
|
||||
static int mbprint(void *, const char *);
|
||||
|
||||
CFATTACH_DECL(mainbus, sizeof(struct mainbus_softc),
|
||||
CFATTACH_DECL(mainbus, sizeof(struct device),
|
||||
mbmatch, mbattach, NULL, NULL);
|
||||
|
||||
void mb_intr_establish(struct confargs *, int (*)(void *), void *);
|
||||
void mb_intr_disestablish(struct confargs *);
|
||||
caddr_t mb_cvtaddr(struct confargs *);
|
||||
int mb_matchname(struct confargs *, char *);
|
||||
|
||||
static int mainbus_found;
|
||||
|
||||
static int
|
||||
@ -73,7 +63,6 @@ mbmatch(struct device *parent, struct cfdata *match, void *aux)
|
||||
static void
|
||||
mbattach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct mainbus_softc *sc = (struct mainbus_softc *)self;
|
||||
struct confargs nca;
|
||||
int i;
|
||||
|
||||
@ -81,13 +70,6 @@ mbattach(struct device *parent, struct device *self, void *aux)
|
||||
|
||||
printf("\n");
|
||||
|
||||
sc->sc_bus.ab_dv = (struct device *)sc;
|
||||
sc->sc_bus.ab_type = BUS_MAIN;
|
||||
sc->sc_bus.ab_intr_establish = mb_intr_establish;
|
||||
sc->sc_bus.ab_intr_disestablish = mb_intr_disestablish;
|
||||
sc->sc_bus.ab_cvtaddr = mb_cvtaddr;
|
||||
sc->sc_bus.ab_matchname = mb_matchname;
|
||||
|
||||
/*
|
||||
* Try to find and attach all of the CPUs in the machine.
|
||||
* ( Right now only one CPU so code is simple )
|
||||
@ -96,14 +78,12 @@ mbattach(struct device *parent, struct device *self, void *aux)
|
||||
nca.ca_name = "cpu";
|
||||
nca.ca_slot = 0;
|
||||
nca.ca_offset = 0;
|
||||
nca.ca_bus = &sc->sc_bus;
|
||||
config_found(self, &nca, mbprint);
|
||||
|
||||
for (i = 0; platform->mainbusdevs[i] != NULL; i++) {
|
||||
nca.ca_name = platform->mainbusdevs[i];
|
||||
nca.ca_slot = 0;
|
||||
nca.ca_offset = 0;
|
||||
nca.ca_bus = &sc->sc_bus;
|
||||
config_found(self, &nca, mbprint);
|
||||
}
|
||||
}
|
||||
@ -116,31 +96,3 @@ mbprint(void *aux, const char *pnp)
|
||||
return QUIET;
|
||||
return UNCONF;
|
||||
}
|
||||
|
||||
void
|
||||
mb_intr_establish(struct confargs *ca, int (*handler)(void *), void *val)
|
||||
{
|
||||
|
||||
panic("can never mb_intr_establish");
|
||||
}
|
||||
|
||||
void
|
||||
mb_intr_disestablish(struct confargs *ca)
|
||||
{
|
||||
|
||||
panic("can never mb_intr_disestablish");
|
||||
}
|
||||
|
||||
caddr_t
|
||||
mb_cvtaddr(struct confargs *ca)
|
||||
{
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int
|
||||
mb_matchname(struct confargs *ca, char *name)
|
||||
{
|
||||
|
||||
return strcmp(name, ca->ca_name) == 0;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: autoconf.h,v 1.12 2005/12/11 12:16:39 christos Exp $ */
|
||||
/* $NetBSD: autoconf.h,v 1.13 2006/06/25 16:46:15 tsutsui Exp $ */
|
||||
/* $OpenBSD: autoconf.h,v 1.2 1997/03/12 19:16:54 pefo Exp $ */
|
||||
/* NetBSD: autoconf.h,v 1.1 1995/02/13 23:07:31 cgd Exp */
|
||||
|
||||
@ -40,37 +40,10 @@ struct confargs;
|
||||
|
||||
typedef int (*intr_handler_t)(void *);
|
||||
|
||||
struct abus {
|
||||
struct device *ab_dv; /* back-pointer to device */
|
||||
int ab_type; /* bus type (see below) */
|
||||
void (*ab_intr_establish) /* bus's set-handler function */
|
||||
(struct confargs *, intr_handler_t, void *);
|
||||
void (*ab_intr_disestablish) /* bus's unset-handler function */
|
||||
(struct confargs *);
|
||||
caddr_t (*ab_cvtaddr) /* convert slot/offset to address */
|
||||
(struct confargs *);
|
||||
int (*ab_matchname) /* see if name matches driver */
|
||||
(struct confargs *, char *);
|
||||
};
|
||||
|
||||
#define BUS_MAIN 1 /* mainbus */
|
||||
#define BUS_PICA 2 /* PICA Bus */
|
||||
#define BUS_ISABR 3 /* ISA Bridge Bus */
|
||||
|
||||
#define BUS_INTR_ESTABLISH(ca, handler, val) \
|
||||
(*(ca)->ca_bus->ab_intr_establish)((ca), (handler), (val))
|
||||
#define BUS_INTR_DISESTABLISH(ca) \
|
||||
(*(ca)->ca_bus->ab_intr_establish)(ca)
|
||||
#define BUS_CVTADDR(ca) \
|
||||
(*(ca)->ca_bus->ab_cvtaddr)(ca)
|
||||
#define BUS_MATCHNAME(ca, name) \
|
||||
(*(ca)->ca_bus->ab_matchname)((ca), (name))
|
||||
|
||||
struct confargs {
|
||||
const char *ca_name; /* Device name. */
|
||||
int ca_slot; /* Device slot. */
|
||||
int ca_offset; /* Offset into slot. */
|
||||
struct abus *ca_bus; /* bus device resides on. */
|
||||
};
|
||||
|
||||
void makebootdev(const char *cp);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: isabrvar.h,v 1.4 2005/12/11 12:16:39 christos Exp $ */
|
||||
/* $NetBSD: isabrvar.h,v 1.5 2006/06/25 16:46:15 tsutsui Exp $ */
|
||||
/* $OpenBSD: isabus.c,v 1.15 1998/03/16 09:38:46 pefo Exp $ */
|
||||
/* NetBSD: isa.c,v 1.33 1995/06/28 04:30:51 cgd Exp */
|
||||
|
||||
@ -79,7 +79,6 @@
|
||||
struct isabr_softc {
|
||||
struct device sc_dev;
|
||||
struct arc_isa_bus arc_isa_cs;
|
||||
struct abus sc_bus;
|
||||
struct arc_bus_dma_tag sc_dmat;
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: isabus.c,v 1.34 2006/06/13 13:51:31 tsutsui Exp $ */
|
||||
/* $NetBSD: isabus.c,v 1.35 2006/06/25 16:46:15 tsutsui Exp $ */
|
||||
/* $OpenBSD: isabus.c,v 1.15 1998/03/16 09:38:46 pefo Exp $ */
|
||||
/* NetBSD: isa.c,v 1.33 1995/06/28 04:30:51 cgd Exp */
|
||||
|
||||
@ -120,7 +120,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: isabus.c,v 1.34 2006/06/13 13:51:31 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: isabus.c,v 1.35 2006/06/25 16:46:15 tsutsui Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/proc.h>
|
||||
@ -190,10 +190,6 @@ isabrattach(struct isabr_softc *sc)
|
||||
/* Initialize interrupt controller */
|
||||
isabr_initicu();
|
||||
|
||||
/*XXX we may remove the abus part of the softc struct... */
|
||||
sc->sc_bus.ab_dv = (struct device *)sc;
|
||||
sc->sc_bus.ab_type = BUS_ISABR;
|
||||
|
||||
sc->arc_isa_cs.ic_attach_hook = isabr_attach_hook;
|
||||
sc->arc_isa_cs.ic_intr_evcnt = isabr_intr_evcnt;
|
||||
sc->arc_isa_cs.ic_intr_establish = isabr_intr_establish;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: jazzio.c,v 1.17 2006/06/24 03:50:38 tsutsui Exp $ */
|
||||
/* $NetBSD: jazzio.c,v 1.18 2006/06/25 16:46:15 tsutsui Exp $ */
|
||||
/* $OpenBSD: picabus.c,v 1.11 1999/01/11 05:11:10 millert Exp $ */
|
||||
/* NetBSD: tc.c,v 1.2 1995/03/08 00:39:05 cgd Exp */
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: jazzio.c,v 1.17 2006/06/24 03:50:38 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: jazzio.c,v 1.18 2006/06/25 16:46:15 tsutsui Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -55,7 +55,6 @@ void arc_sysreset(bus_addr_t, bus_size_t);
|
||||
|
||||
struct jazzio_softc {
|
||||
struct device sc_dv;
|
||||
struct abus sc_bus;
|
||||
struct arc_bus_dma_tag sc_dmat;
|
||||
struct pica_dev *sc_devs;
|
||||
};
|
||||
@ -133,8 +132,6 @@ jazzioattach(struct device *parent, struct device *self, void *aux)
|
||||
/* set up interrupt handlers */
|
||||
(*platform->set_intr)(MIPS_INT_MASK_1, jazzio_intr, ARC_INTPRI_JAZZ);
|
||||
|
||||
sc->sc_bus.ab_dv = (struct device *)sc;
|
||||
|
||||
/* Initialize jazzio DMA mapping register area and pool */
|
||||
jazz_dmatlb_init(&jazzio_bus, jazzio_conf->jc_dmatlbreg);
|
||||
|
||||
@ -145,7 +142,6 @@ jazzioattach(struct device *parent, struct device *self, void *aux)
|
||||
for (i = 0; sc->sc_devs[i].ps_ca.ca_name != NULL; i++) {
|
||||
|
||||
ja.ja_name = sc->sc_devs[i].ps_ca.ca_name;
|
||||
ja.ja_bus = &sc->sc_bus;
|
||||
ja.ja_bust = &jazzio_bus;
|
||||
ja.ja_dmat = &sc->sc_dmat;
|
||||
ja.ja_addr = (bus_addr_t)sc->sc_devs[i].ps_base;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: jazziovar.h,v 1.5 2005/12/11 12:16:39 christos Exp $ */
|
||||
/* $NetBSD: jazziovar.h,v 1.6 2006/06/25 16:46:15 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 2000 Shuichiro URATA. All rights reserved.
|
||||
@ -33,7 +33,6 @@
|
||||
|
||||
struct jazzio_attach_args {
|
||||
const char *ja_name;
|
||||
struct abus *ja_bus;
|
||||
bus_space_tag_t ja_bust;
|
||||
bus_dma_tag_t ja_dmat;
|
||||
bus_addr_t ja_addr;
|
||||
|
Loading…
Reference in New Issue
Block a user