summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authordrochner <drochner@NetBSD.org>2004-08-30 15:05:15 +0000
committerdrochner <drochner@NetBSD.org>2004-08-30 15:05:15 +0000
commit46289e1fef5fa25a922e2a968d7fa98e43a0c809 (patch)
tree080859cbc4f0a6d9272ba00d1276ee6ee550d91b /sys
parentd55b8a219009ead8fd52bed03a6f9559595c9fd8 (diff)
Phase out the use of a string as first "attach args" member to control
which bustype should be attached with a specific call to config_found() (from a "mainbus" or a bus bridge). Do it for isa/eisa/mca and pci/agp for now. These buses all attach to an mi interface attribute "isabus", "eisabus" etc., and the autoconf framework now allows to specify an interface attribute on config_found() and config_search(), which limits the search of matching config data to these which attach to that specific attribute. So we basically have to call config_found_ia(..., "foobus", ...) where such a bus is attached. As a consequence, where a "mainbus" or alike also attaches other devices (eg CPUs) which do not attach to a specific attribute yet, we need at least pass an attribute name (different from "foobus") so that the foo bus is not found at these places. This made some minor changes necessary which are not obviously related to the mentioned buses.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/algor/dev/bonito_mainbus.c22
-rw-r--r--sys/arch/algor/dev/vtpbc_mainbus.c22
-rw-r--r--sys/arch/algor/pci/pcib.c18
-rw-r--r--sys/arch/alpha/a12/a12dc.c7
-rw-r--r--sys/arch/alpha/a12/if_xb.c7
-rw-r--r--sys/arch/alpha/conf/files.alpha17
-rw-r--r--sys/arch/alpha/jensenio/jensenio.c43
-rw-r--r--sys/arch/alpha/jensenio/jenseniovar.h4
-rw-r--r--sys/arch/alpha/pci/a12c.c31
-rw-r--r--sys/arch/alpha/pci/apecs.c23
-rw-r--r--sys/arch/alpha/pci/cia.c23
-rw-r--r--sys/arch/alpha/pci/dwlpx.c22
-rw-r--r--sys/arch/alpha/pci/irongate.c25
-rw-r--r--sys/arch/alpha/pci/lca.c23
-rw-r--r--sys/arch/alpha/pci/mcpcia.c22
-rw-r--r--sys/arch/alpha/pci/sio.c25
-rw-r--r--sys/arch/alpha/pci/tsc.c22
-rw-r--r--sys/arch/alpha/pci/ttwoga.c25
-rw-r--r--sys/arch/alpha/sableio/sableio.c7
-rw-r--r--sys/arch/amd64/amd64/mainbus.c19
-rw-r--r--sys/arch/amd64/conf/files.amd646
-rw-r--r--sys/arch/amd64/pci/pchb.c19
-rw-r--r--sys/arch/amd64/pci/pcib.c20
-rw-r--r--sys/arch/arc/isa/isabus.c10
-rw-r--r--sys/arch/arc/pci/necpb.c22
-rw-r--r--sys/arch/arm/footbridge/footbridge.c13
-rw-r--r--sys/arch/arm/ixp12x0/ixp12x0.c22
-rw-r--r--sys/arch/arm/s3c2xx0/s3c2800_pci.c20
-rw-r--r--sys/arch/arm/xscale/becc.c28
-rw-r--r--sys/arch/arm/xscale/i80312.c29
-rw-r--r--sys/arch/arm/xscale/i80321.c30
-rw-r--r--sys/arch/arm/xscale/ixp425.c21
-rw-r--r--sys/arch/atari/isa/isa_machdep.c11
-rw-r--r--sys/arch/atari/pci/pci_machdep.c11
-rw-r--r--sys/arch/bebox/bebox/mainbus.c40
-rw-r--r--sys/arch/bebox/conf/files.bebox4
-rw-r--r--sys/arch/bebox/pci/pcib.c20
-rw-r--r--sys/arch/cats/pci/pcib.c20
-rw-r--r--sys/arch/cobalt/dev/gt.c7
-rw-r--r--sys/arch/dreamcast/dev/g2/gapspci.c21
-rw-r--r--sys/arch/evbarm/ifpga/ifpga.c29
-rw-r--r--sys/arch/evbmips/malta/dev/gt.c7
-rw-r--r--sys/arch/evbmips/malta/pci/pcib.c18
-rw-r--r--sys/arch/evbppc/walnut/pci/pchb.c7
-rw-r--r--sys/arch/evbsh5/dev/superio.c19
-rw-r--r--sys/arch/hp700/dev/dino.c18
-rw-r--r--sys/arch/hp700/dev/mongoose.c24
-rw-r--r--sys/arch/hpcmips/isa/isa_machdep.c7
-rw-r--r--sys/arch/hpcmips/isa/plumisa_machdep.c7
-rw-r--r--sys/arch/hpcmips/vr/vrc4172pci.c25
-rw-r--r--sys/arch/hpcmips/vr/vrpciu.c25
-rw-r--r--sys/arch/i386/bios/vesabios.c9
-rw-r--r--sys/arch/i386/conf/files.i38616
-rw-r--r--sys/arch/i386/i386/apm.c10
-rw-r--r--sys/arch/i386/i386/cpu.c9
-rw-r--r--sys/arch/i386/i386/mainbus.c35
-rw-r--r--sys/arch/i386/mca/mca_machdep.c7
-rw-r--r--sys/arch/i386/pci/pceb.c23
-rw-r--r--sys/arch/i386/pci/pchb.c34
-rw-r--r--sys/arch/i386/pci/pcib.c20
-rw-r--r--sys/arch/i386/pci/pcmb.c37
-rw-r--r--sys/arch/i386/pnpbios/files.pnpbios4
-rw-r--r--sys/arch/i386/pnpbios/pnpbios.c9
-rw-r--r--sys/arch/ibmnws/ibmnws/mainbus.c13
-rw-r--r--sys/arch/ibmnws/pci/pcib.c20
-rw-r--r--sys/arch/macppc/macppc/mainbus.c18
-rw-r--r--sys/arch/macppc/pci/bandit.c21
-rw-r--r--sys/arch/macppc/pci/grackle.c21
-rw-r--r--sys/arch/macppc/pci/uninorth.c21
-rw-r--r--sys/arch/mipsco/isa/isa_machdep.c11
-rw-r--r--sys/arch/mvmeppc/mvmeppc/cpu.c7
-rw-r--r--sys/arch/mvmeppc/mvmeppc/mainbus.c38
-rw-r--r--sys/arch/mvmeppc/pci/pcib.c20
-rw-r--r--sys/arch/netwinder/pci/pcib.c20
-rw-r--r--sys/arch/ofppc/firepower/firepower.c21
-rw-r--r--sys/arch/powerpc/ibm4xx/pci/pchb.c7
-rw-r--r--sys/arch/prep/pci/pcib.c20
-rw-r--r--sys/arch/prep/prep/mainbus.c15
-rw-r--r--sys/arch/sandpoint/pci/pcib.c20
-rw-r--r--sys/arch/sandpoint/sandpoint/mainbus.c45
-rw-r--r--sys/arch/sgimips/mace/pci_mace.c24
-rw-r--r--sys/arch/sh5/pci/sh5_pci.c7
-rw-r--r--sys/arch/sparc/conf/files.sparc4
-rw-r--r--sys/arch/sparc/sparc/msiiep.c7
-rw-r--r--sys/arch/sparc64/dev/psycho.c7
-rw-r--r--sys/arch/x86/conf/files.x866
-rw-r--r--sys/arch/x86/x86/mpacpi.c19
-rw-r--r--sys/arch/x86/x86/mpbios.c16
-rw-r--r--sys/arch/xen/conf/files.xen21
-rw-r--r--sys/arch/xen/i386/mainbus.c34
-rw-r--r--sys/dev/acpi/acpi.c9
-rw-r--r--sys/dev/cardbus/rbus_ppb.c9
-rw-r--r--sys/dev/eisa/eisa.c9
-rw-r--r--sys/dev/eisa/eisavar.h4
-rw-r--r--sys/dev/ic/cpc700.c25
-rw-r--r--sys/dev/isa/isa.c9
-rw-r--r--sys/dev/isa/isavar.h4
-rw-r--r--sys/dev/marvell/gtpci.c7
-rw-r--r--sys/dev/mca/mca.c7
-rw-r--r--sys/dev/mca/mcavar.h4
-rw-r--r--sys/dev/pci/agp.c7
-rw-r--r--sys/dev/pci/agpvar.h4
-rw-r--r--sys/dev/pci/pci.c7
-rw-r--r--sys/dev/pci/pcivar.h4
-rw-r--r--sys/dev/pci/ppb.c23
105 files changed, 456 insertions, 1339 deletions
diff --git a/sys/arch/algor/dev/bonito_mainbus.c b/sys/arch/algor/dev/bonito_mainbus.c
index 6d2a7735164..b1436f2a662 100644
--- a/sys/arch/algor/dev/bonito_mainbus.c
+++ b/sys/arch/algor/dev/bonito_mainbus.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bonito_mainbus.c,v 1.8 2003/07/14 22:57:47 lukem Exp $ */
+/* $NetBSD: bonito_mainbus.c,v 1.9 2004/08/30 15:05:15 drochner Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bonito_mainbus.c,v 1.8 2003/07/14 22:57:47 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bonito_mainbus.c,v 1.9 2004/08/30 15:05:15 drochner Exp $");
#include "opt_algor_p6032.h"
@@ -68,8 +68,6 @@ CFATTACH_DECL(bonito_mainbus, sizeof(struct bonito_softc),
bonito_mainbus_match, bonito_mainbus_attach, NULL, NULL);
extern struct cfdriver bonito_cd;
-int bonito_mainbus_print(void *, const char *);
-
int
bonito_mainbus_match(struct device *parent, struct cfdata *cf, void *aux)
{
@@ -103,7 +101,6 @@ bonito_mainbus_attach(struct device *parent, struct device *self, void *aux)
BONITO_REV_FPGA(rev) ? "FPGA" : "ASIC",
BONITO_REV_MAJOR(rev), BONITO_REV_MINOR(rev));
- pba.pba_busname = "pci";
pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED;
pba.pba_bus = 0;
pba.pba_bridgetag = NULL;
@@ -120,18 +117,5 @@ bonito_mainbus_attach(struct device *parent, struct device *self, void *aux)
}
#endif /* ALGOR_P6032 */
- (void) config_found(self, &pba, bonito_mainbus_print);
-}
-
-int
-bonito_mainbus_print(void *aux, const char *pnp)
-{
- struct pcibus_attach_args *pba = aux;
-
- /* only PCIs can attach to BONITOs; easy. */
- if (pnp)
- aprint_normal("%s at %s", pba->pba_busname, pnp);
- aprint_normal(" bus %d", pba->pba_bus);
-
- return (UNCONF);
+ (void) config_found_ia(self, "pcibus", &pba, pcibusprint);
}
diff --git a/sys/arch/algor/dev/vtpbc_mainbus.c b/sys/arch/algor/dev/vtpbc_mainbus.c
index be61e55e46c..8fccecaecbc 100644
--- a/sys/arch/algor/dev/vtpbc_mainbus.c
+++ b/sys/arch/algor/dev/vtpbc_mainbus.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vtpbc_mainbus.c,v 1.12 2003/07/14 22:57:47 lukem Exp $ */
+/* $NetBSD: vtpbc_mainbus.c,v 1.13 2004/08/30 15:05:15 drochner Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vtpbc_mainbus.c,v 1.12 2003/07/14 22:57:47 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vtpbc_mainbus.c,v 1.13 2004/08/30 15:05:15 drochner Exp $");
#include "opt_algor_p4032.h"
#include "opt_algor_p5064.h"
@@ -73,8 +73,6 @@ CFATTACH_DECL(vtpbc_mainbus, sizeof(struct vtpbc_softc),
vtpbc_mainbus_match, vtpbc_mainbus_attach, NULL, NULL);
extern struct cfdriver vtpbc_cd;
-int vtpbc_mainbus_print(void *, const char *);
-
int
vtpbc_mainbus_match(struct device *parent, struct cfdata *cf, void *aux)
{
@@ -109,7 +107,6 @@ vtpbc_mainbus_attach(struct device *parent, struct device *self, void *aux)
printf("%s: PCI DMA window base: 0x%08lx\n", sc->sc_dev.dv_xname,
(u_long) vt->vt_dma_winbase);
- pba.pba_busname = "pci";
pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED;
pba.pba_bus = 0;
pba.pba_bridgetag = NULL;
@@ -139,18 +136,5 @@ vtpbc_mainbus_attach(struct device *parent, struct device *self, void *aux)
}
#endif /* ALGOR_P4032 || ALGOR_P5064 */
- (void) config_found(self, &pba, vtpbc_mainbus_print);
-}
-
-int
-vtpbc_mainbus_print(void *aux, const char *pnp)
-{
- struct pcibus_attach_args *pba = aux;
-
- /* only PCIs can attach to VTPBCs; easy. */
- if (pnp)
- aprint_normal("%s at %s", pba->pba_busname, pnp);
- aprint_normal(" bus %d", pba->pba_bus);
-
- return (UNCONF);
+ (void) config_found_ia(self, "pcibus", &pba, pcibusprint);
}
diff --git a/sys/arch/algor/pci/pcib.c b/sys/arch/algor/pci/pcib.c
index e566324463d..6e4c701c7de 100644
--- a/sys/arch/algor/pci/pcib.c
+++ b/sys/arch/algor/pci/pcib.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pcib.c,v 1.15 2004/04/23 21:13:05 itojun Exp $ */
+/* $NetBSD: pcib.c,v 1.16 2004/08/30 15:05:15 drochner Exp $ */
/*-
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.15 2004/04/23 21:13:05 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.16 2004/08/30 15:05:15 drochner Exp $");
#include "opt_algor_p5064.h"
#include "opt_algor_p6032.h"
@@ -124,7 +124,6 @@ void pcib_attach(struct device *, struct device *, void *);
CFATTACH_DECL(pcib, sizeof(struct pcib_softc),
pcib_match, pcib_attach, NULL, NULL);
-int pcib_print(void *, const char *pnp);
void pcib_isa_attach_hook(struct device *, struct device *,
struct isabus_attach_args *);
@@ -305,7 +304,6 @@ pcib_bridge_callback(self)
memset(&iba, 0, sizeof(iba));
- iba.iba_busname = "isa";
#if defined(ALGOR_P5064)
{
struct p5064_config *acp = &p5064_configuration;
@@ -327,17 +325,7 @@ pcib_bridge_callback(self)
iba.iba_ic = &sc->sc_ic;
iba.iba_ic->ic_attach_hook = pcib_isa_attach_hook;
- (void) config_found(&sc->sc_dev, &iba, pcib_print);
-}
-
-int
-pcib_print(void *aux, const char *pnp)
-{
- struct isabus_attach_args *iba = aux;
-
- if (pnp)
- aprint_normal("%s at %s", iba->iba_busname, pnp);
- return (UNCONF);
+ (void) config_found_ia(&sc->sc_dev, "isabus", &iba, isabusprint);
}
void
diff --git a/sys/arch/alpha/a12/a12dc.c b/sys/arch/alpha/a12/a12dc.c
index 773e16c3dcd..43171ff08b6 100644
--- a/sys/arch/alpha/a12/a12dc.c
+++ b/sys/arch/alpha/a12/a12dc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: a12dc.c,v 1.11 2003/01/20 05:29:57 simonb Exp $ */
+/* $NetBSD: a12dc.c,v 1.12 2004/08/30 15:05:15 drochner Exp $ */
/* [Notice revision 2.2]
* Copyright (c) 1997, 1998 Avalon Computer Systems, Inc.
@@ -64,7 +64,7 @@
#ifndef BSIDE
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: a12dc.c,v 1.11 2003/01/20 05:29:57 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: a12dc.c,v 1.12 2004/08/30 15:05:15 drochner Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -149,7 +149,6 @@ a12dcmatch(parent, match, aux)
struct pcibus_attach_args *pba = aux;
return cputype == ST_AVALON_A12
- && strcmp(pba->pba_busname, a12dc_cd.cd_name) == 0
&& !a12dcfound;
}
@@ -164,7 +163,7 @@ a12dcattach(parent, self, aux)
/* note that we've attached the chipset; can't have 2 A12Cs. */
a12dcfound = 1;
- printf(": driver %s\n", "$Revision: 1.11 $");
+ printf(": driver %s\n", "$Revision: 1.12 $");
tp = a12dc_tty[0] = ttymalloc();
tp->t_oproc = a12dcstart;
diff --git a/sys/arch/alpha/a12/if_xb.c b/sys/arch/alpha/a12/if_xb.c
index c37f24ee90a..ea1faaa2b1e 100644
--- a/sys/arch/alpha/a12/if_xb.c
+++ b/sys/arch/alpha/a12/if_xb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_xb.c,v 1.11 2002/10/02 04:06:37 thorpej Exp $ */
+/* $NetBSD: if_xb.c,v 1.12 2004/08/30 15:05:15 drochner Exp $ */
/* [Notice revision 2.2]
* Copyright (c) 1997, 1998 Avalon Computer Systems, Inc.
@@ -74,7 +74,7 @@
#include "opt_avalon_a12.h" /* Config options headers */
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: if_xb.c,v 1.11 2002/10/02 04:06:37 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_xb.c,v 1.12 2004/08/30 15:05:15 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -218,7 +218,6 @@ xbmatch(parent, match, aux)
struct pcibus_attach_args *pba = aux;
return cputype == ST_AVALON_A12
- && strcmp(pba->pba_busname, xb_cd.cd_name) == 0
&& !xbfound;
}
@@ -233,7 +232,7 @@ xbattach(parent, self, aux)
xbfound = 1;
ccp = &xb_configuration;
xb_init_config(ccp, 1);
- printf(": driver %s mtu %d\n", "$Revision: 1.11 $", xbi.if_mtu);
+ printf(": driver %s mtu %d\n", "$Revision: 1.12 $", xbi.if_mtu);
}
static void
diff --git a/sys/arch/alpha/conf/files.alpha b/sys/arch/alpha/conf/files.alpha
index 1e88cf357fd..bdab10c3add 100644
--- a/sys/arch/alpha/conf/files.alpha
+++ b/sys/arch/alpha/conf/files.alpha
@@ -1,4 +1,4 @@
-# $NetBSD: files.alpha,v 1.166 2004/03/13 17:31:33 bjh21 Exp $
+# $NetBSD: files.alpha,v 1.167 2004/08/30 15:05:15 drochner Exp $
#
# alpha-specific configuration info
@@ -300,7 +300,10 @@ file arch/alpha/pci/cia_bwx_bus_mem.c cia
file arch/alpha/pci/cia_swiz_bus_io.c cia
file arch/alpha/pci/cia_swiz_bus_mem.c cia
-device a12c { }: pcibus
+define a12c_xb {}
+define a12c_a12dc {}
+
+device a12c { }: pcibus, a12c_xb, a12c_a12dc
attach a12c at mainbus
file arch/alpha/pci/a12c.c a12c
file arch/alpha/pci/a12c_bus_mem.c a12c
@@ -352,7 +355,9 @@ file arch/alpha/pci/tsp_bus_mem.c tsp
device ttwoga { hose = -1 }
attach ttwoga at mainbus
-device ttwopci: pcibus, alpha_sgmap, alpha_pci_sgmap_pte64
+# identical to pcibus
+define sableiobus {[bus = -1]}
+device ttwopci: pcibus, sableiobus, alpha_sgmap, alpha_pci_sgmap_pte64
attach ttwopci at ttwoga
file arch/alpha/pci/ttwoga.c ttwoga
file arch/alpha/pci/ttwoga_bus_io.c ttwoga
@@ -364,7 +369,7 @@ file arch/alpha/pci/ttwoga_pci.c ttwoga
# Sable STDIO support
#
device sableio { port = -1 }
-attach sableio at pcibus
+attach sableio at sableiobus
file arch/alpha/sableio/sableio.c sableio
attach com at sableio with com_sableio
@@ -430,13 +435,13 @@ file arch/alpha/a12/if_ade.c ade
# Switch
device xb
-attach xb at a12c
+attach xb at a12c_xb
file arch/alpha/a12/if_xb.c xb
# Console
device a12dc
-attach a12dc at a12c
+attach a12dc at a12c_a12dc
file arch/alpha/a12/a12dc.c a12dc needs-flag
#
diff --git a/sys/arch/alpha/jensenio/jensenio.c b/sys/arch/alpha/jensenio/jensenio.c
index 8daa8303592..27f443e0c1e 100644
--- a/sys/arch/alpha/jensenio/jensenio.c
+++ b/sys/arch/alpha/jensenio/jensenio.c
@@ -1,4 +1,4 @@
-/* $NetBSD: jensenio.c,v 1.8 2003/01/01 00:39:19 thorpej Exp $ */
+/* $NetBSD: jensenio.c,v 1.9 2004/08/30 15:05:15 drochner Exp $ */
/*-
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -50,7 +50,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: jensenio.c,v 1.8 2003/01/01 00:39:19 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: jensenio.c,v 1.9 2004/08/30 15:05:15 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -91,7 +91,8 @@ CFATTACH_DECL(jensenio, sizeof(struct device),
jensenio_match, jensenio_attach, NULL, NULL);
int jensenio_print(void *, const char *);
-int jensenio_submatch(struct device *, struct cfdata *, void *);
+int jensenio_submatch(struct device *, struct cfdata *,
+ const locdesc_t *, void *);
int jensenio_attached;
@@ -155,6 +156,8 @@ jensenio_attach(struct device *parent, struct device *self, void *aux)
struct jensenio_attach_args ja;
struct jensenio_config *jcp = &jensenio_configuration;
int i;
+ int help[2];
+ locdesc_t *ldesc = (void *)help; /* XXX */
printf("\n");
@@ -188,8 +191,10 @@ jensenio_attach(struct device *parent, struct device *self, void *aux)
ja.ja_iot = &jcp->jc_internal_iot;
ja.ja_ec = &jcp->jc_ec;
- (void) config_found_sm(self, &ja, jensenio_print,
- jensenio_submatch);
+ ldesc->len = 1;
+ ldesc->locs[JENSENIOCF_PORT] = jensenio_devs[i].jd_ioaddr;
+ (void) config_found_sm_loc(self, "jensenio", ldesc, &ja,
+ jensenio_print, jensenio_submatch);
}
/*
@@ -198,41 +203,31 @@ jensenio_attach(struct device *parent, struct device *self, void *aux)
jcp->jc_ec.ec_attach_hook = jensenio_eisa_attach_hook;
jcp->jc_ec.ec_maxslots = jensenio_eisa_maxslots;
- ja.ja_eisa.eba_busname = "eisa";
ja.ja_eisa.eba_iot = &jcp->jc_eisa_iot;
ja.ja_eisa.eba_memt = &jcp->jc_eisa_memt;
ja.ja_eisa.eba_dmat = &jcp->jc_dmat_eisa;
ja.ja_eisa.eba_ec = &jcp->jc_ec;
- (void) config_found(self, &ja.ja_eisa, jensenio_print);
+ (void) config_found_ia(self, "eisabus", &ja.ja_eisa, eisabusprint);
/*
* Attach the ISA bus.
*/
jcp->jc_ic.ic_attach_hook = jensenio_isa_attach_hook;
- ja.ja_isa.iba_busname = "isa";
ja.ja_isa.iba_iot = &jcp->jc_eisa_iot;
ja.ja_isa.iba_memt = &jcp->jc_eisa_memt;
ja.ja_isa.iba_dmat = &jcp->jc_dmat_isa;
ja.ja_isa.iba_ic = &jcp->jc_ic;
- (void) config_found(self, &ja.ja_isa, jensenio_print);
+ (void) config_found_ia(self, "isabus", &ja.ja_isa, isabusprint);
}
int
-jensenio_submatch(struct device *parent, struct cfdata *cf, void *aux)
+jensenio_submatch(struct device *parent, struct cfdata *cf,
+ const locdesc_t *ldesc, void *aux)
{
- struct jensenio_attach_args *ja = aux;
-
- /*
- * Skip the locator song-and-dance if we're attaching the
- * EISA or ISA layer.
- */
- if (strcmp(ja->ja_name, "eisa") == 0 ||
- strcmp(ja->ja_name, "isa") == 0)
- return (config_match(parent, cf, aux));
if (cf->cf_loc[JENSENIOCF_PORT] != JENSENIOCF_PORT_DEFAULT &&
- cf->cf_loc[JENSENIOCF_PORT] != ja->ja_ioaddr)
+ cf->cf_loc[JENSENIOCF_PORT] != ldesc->locs[JENSENIOCF_PORT])
return (0);
return (config_match(parent, cf, aux));
@@ -246,13 +241,7 @@ jensenio_print(void *aux, const char *pnp)
if (pnp != NULL)
aprint_normal("%s at %s", ja->ja_name, pnp);
- /*
- * Skip the locator song-and-dance if we're attaching the
- * EISA or ISA layer.
- */
- if (strcmp(ja->ja_name, "eisa") != 0 &&
- strcmp(ja->ja_name, "isa") != 0)
- aprint_normal(" port 0x%lx", ja->ja_ioaddr);
+ aprint_normal(" port 0x%lx", ja->ja_ioaddr);
return (UNCONF);
}
diff --git a/sys/arch/alpha/jensenio/jenseniovar.h b/sys/arch/alpha/jensenio/jenseniovar.h
index 06a3c88cfc5..7ec015859b6 100644
--- a/sys/arch/alpha/jensenio/jenseniovar.h
+++ b/sys/arch/alpha/jensenio/jenseniovar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: jenseniovar.h,v 1.1 2000/07/12 20:36:10 thorpej Exp $ */
+/* $NetBSD: jenseniovar.h,v 1.2 2004/08/30 15:05:15 drochner Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -48,6 +48,7 @@ struct jensenio_attach_args {
struct isabus_attach_args jaun_isa;
} ja_un;
+ const char *ja_name;
bus_addr_t ja_ioaddr; /* I/O space address */
int ja_irq[2]; /* Jensen IRQs */
@@ -56,7 +57,6 @@ struct jensenio_attach_args {
#define ja_isa ja_un.jaun_isa
/* For attaching built-in devices. */
-#define ja_name ja_eisa.eba_busname
#define ja_iot ja_eisa.eba_iot
#define ja_ec ja_eisa.eba_ec
};
diff --git a/sys/arch/alpha/pci/a12c.c b/sys/arch/alpha/pci/a12c.c
index 497ae6da300..f0c48b58dae 100644
--- a/sys/arch/alpha/pci/a12c.c
+++ b/sys/arch/alpha/pci/a12c.c
@@ -1,4 +1,4 @@
-/* $NetBSD: a12c.c,v 1.14 2003/06/15 23:08:54 fvdl Exp $ */
+/* $NetBSD: a12c.c,v 1.15 2004/08/30 15:05:15 drochner Exp $ */
/* [Notice revision 2.2]
* Copyright (c) 1997, 1998 Avalon Computer Systems, Inc.
@@ -38,7 +38,7 @@
#include "opt_avalon_a12.h" /* Config options headers */
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: a12c.c,v 1.14 2003/06/15 23:08:54 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: a12c.c,v 1.15 2004/08/30 15:05:15 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -71,8 +71,6 @@ CFATTACH_DECL(a12c, sizeof(struct a12c_softc),
extern struct cfdriver a12c_cd;
-static int a12cprint __P((void *, const char *pnp));
-
static const struct clocktime zeroct;
static void noclock_init(struct device *);
@@ -143,14 +141,13 @@ a12cattach(parent, self, aux)
a12c_init(ccp, 1);
/* XXX print chipset information */
- printf(": driver %s over logic %x\n", "$Revision: 1.14 $",
+ printf(": driver %s over logic %x\n", "$Revision: 1.15 $",
A12_ALL_EXTRACT(REGVAL(A12_VERS)));
pci_a12_pickintr(ccp);
clockfns = &noclock_fns; /* XXX? */
memset(&pba, 0, sizeof(pba));
- pba.pba_busname = "pci";
pba.pba_iot = 0;
pba.pba_memt = ccp->ac_memt;
pba.pba_dmat = &ccp->ac_dmat_direct;
@@ -161,29 +158,13 @@ a12cattach(parent, self, aux)
pba.pba_flags = PCI_FLAGS_MEM_ENABLED |
PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY | PCI_FLAGS_MWI_OKAY;
- config_found(self, &pba, a12cprint);
+ config_found_ia(self, "pcibus", &pba, pcibusprint);
- pba.pba_busname = "xb";
pba.pba_bus = 1;
- config_found(self, &pba, NULL);
+ config_found_ia(self, "a12c_xb", &pba, NULL);
- pba.pba_busname = "a12dc";
pba.pba_bus = 2;
- config_found(self, &pba, NULL);
-}
-
-static int
-a12cprint(aux, pnp)
- void *aux;
- const char *pnp;
-{
- register struct pcibus_attach_args *pba = aux;
-
- /* can attach xbar or pci to a12c */
- if (pnp)
- aprint_normal("%s at %s", pba->pba_busname, pnp);
- aprint_normal(" bus %d", pba->pba_bus);
- return (UNCONF);
+ config_found_ia(self, "a12c_a12dc", &pba, NULL);
}
static void noclock_init(struct device *dev) {
diff --git a/sys/arch/alpha/pci/apecs.c b/sys/arch/alpha/pci/apecs.c
index a817b48ef0b..8ab3b71df26 100644
--- a/sys/arch/alpha/pci/apecs.c
+++ b/sys/arch/alpha/pci/apecs.c
@@ -1,4 +1,4 @@
-/* $NetBSD: apecs.c,v 1.43 2003/06/15 23:08:54 fvdl Exp $ */
+/* $NetBSD: apecs.c,v 1.44 2004/08/30 15:05:15 drochner Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: apecs.c,v 1.43 2003/06/15 23:08:54 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apecs.c,v 1.44 2004/08/30 15:05:15 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -112,8 +112,6 @@ CFATTACH_DECL(apecs, sizeof(struct apecs_softc),
extern struct cfdriver apecs_cd;
-static int apecsprint __P((void *, const char *pnp));
-
int apecs_bus_get_window __P((int, int,
struct alpha_bus_space_translation *));
@@ -240,7 +238,6 @@ apecsattach(parent, self, aux)
panic("apecsattach: shouldn't be here, really...");
}
- pba.pba_busname = "pci";
pba.pba_iot = &acp->ac_iot;
pba.pba_memt = &acp->ac_memt;
pba.pba_dmat =
@@ -251,21 +248,7 @@ apecsattach(parent, self, aux)
pba.pba_bridgetag = NULL;
pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED |
PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY | PCI_FLAGS_MWI_OKAY;
- config_found(self, &pba, apecsprint);
-}
-
-static int
-apecsprint(aux, pnp)
- void *aux;
- const char *pnp;
-{
- register struct pcibus_attach_args *pba = aux;
-
- /* only PCIs can attach to APECSes; easy. */
- if (pnp)
- aprint_normal("%s at %s", pba->pba_busname, pnp);
- aprint_normal(" bus %d", pba->pba_bus);
- return (UNCONF);
+ config_found_ia(self, "pcibus", &pba, pcibusprint);
}
int
diff --git a/sys/arch/alpha/pci/cia.c b/sys/arch/alpha/pci/cia.c
index b118d508a7b..fab5a702ddc 100644
--- a/sys/arch/alpha/pci/cia.c
+++ b/sys/arch/alpha/pci/cia.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cia.c,v 1.62 2003/06/15 23:08:54 fvdl Exp $ */
+/* $NetBSD: cia.c,v 1.63 2004/08/30 15:05:15 drochner Exp $ */
/*-
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: cia.c,v 1.62 2003/06/15 23:08:54 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cia.c,v 1.63 2004/08/30 15:05:15 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -119,8 +119,6 @@ CFATTACH_DECL(cia, sizeof(struct cia_softc),
extern struct cfdriver cia_cd;
-static int ciaprint __P((void *, const char *pnp));
-
int cia_bus_get_window __P((int, int,
struct alpha_bus_space_translation *));
@@ -410,7 +408,6 @@ ciaattach(parent, self, aux)
panic("ciaattach: shouldn't be here, really...");
}
- pba.pba_busname = "pci";
pba.pba_iot = &ccp->cc_iot;
pba.pba_memt = &ccp->cc_memt;
pba.pba_dmat =
@@ -423,21 +420,7 @@ ciaattach(parent, self, aux)
if ((ccp->cc_flags & CCF_PYXISBUG) == 0)
pba.pba_flags |= PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY |
PCI_FLAGS_MWI_OKAY;
- config_found(self, &pba, ciaprint);
-}
-
-static int
-ciaprint(aux, pnp)
- void *aux;
- const char *pnp;
-{
- register struct pcibus_attach_args *pba = aux;
-
- /* only PCIs can attach to CIAs; easy. */
- if (pnp)
- aprint_normal("%s at %s", pba->pba_busname, pnp);
- aprint_normal(" bus %d", pba->pba_bus);
- return (UNCONF);
+ config_found_ia(self, "pcibus", &pba, pcibusprint);
}
int
diff --git a/sys/arch/alpha/pci/dwlpx.c b/sys/arch/alpha/pci/dwlpx.c
index f95918ad032..0fdbcbc2de7 100644
--- a/sys/arch/alpha/pci/dwlpx.c
+++ b/sys/arch/alpha/pci/dwlpx.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dwlpx.c,v 1.28 2003/06/15 23:08:54 fvdl Exp $ */
+/* $NetBSD: dwlpx.c,v 1.29 2004/08/30 15:05:16 drochner Exp $ */
/*
* Copyright (c) 1997 by Matthew Jacob
@@ -32,7 +32,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: dwlpx.c,v 1.28 2003/06/15 23:08:54 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwlpx.c,v 1.29 2004/08/30 15:05:16 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -67,24 +67,9 @@ CFATTACH_DECL(dwlpx, sizeof(struct dwlpx_softc),
extern struct cfdriver dwlpx_cd;
-static int dwlpxprint __P((void *, const char *));
-
void dwlpx_errintr(void *, u_long vec);
static int
-dwlpxprint(aux, pnp)
- void *aux;
- const char *pnp;
-{
- register struct pcibus_attach_args *pba = aux;
- /* only PCIs can attach to DWLPX's; easy. */
- if (pnp)
- aprint_normal("%s at %s", pba->pba_busname, pnp);
- aprint_normal(" bus %d", pba->pba_bus);
- return (UNCONF);
-}
-
-static int
dwlpxmatch(parent, cf, aux)
struct device *parent;
struct cfdata *cf;
@@ -166,7 +151,6 @@ dwlpxattach(parent, self, aux)
/*
* Attach PCI bus
*/
- pba.pba_busname = "pci";
pba.pba_iot = &sc->dwlpx_cc.cc_iot;
pba.pba_memt = &sc->dwlpx_cc.cc_memt;
pba.pba_dmat = /* start with direct, may change... */
@@ -177,7 +161,7 @@ dwlpxattach(parent, self, aux)
pba.pba_bridgetag = NULL;
pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED |
PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY | PCI_FLAGS_MWI_OKAY;
- config_found(self, &pba, dwlpxprint);
+ config_found_ia(self, "pcibus", &pba, pcibusprint);
}
void
diff --git a/sys/arch/alpha/pci/irongate.c b/sys/arch/alpha/pci/irongate.c
index a2a21ed756c..96cb5d02a6f 100644
--- a/sys/arch/alpha/pci/irongate.c
+++ b/sys/arch/alpha/pci/irongate.c
@@ -1,4 +1,4 @@
-/* $NetBSD: irongate.c,v 1.11 2003/06/15 23:08:55 fvdl Exp $ */
+/* $NetBSD: irongate.c,v 1.12 2004/08/30 15:05:16 drochner Exp $ */
/*-
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: irongate.c,v 1.11 2003/06/15 23:08:55 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: irongate.c,v 1.12 2004/08/30 15:05:16 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -70,8 +70,6 @@ void irongate_attach(struct device *, struct device *, void *);
CFATTACH_DECL(irongate, sizeof(struct irongate_softc),
irongate_match, irongate_attach, NULL, NULL);
-int irongate_print(void *, const char *pnp);
-
extern struct cfdriver irongate_cd;
/* There can be only one. */
@@ -178,7 +176,6 @@ irongate_attach(struct device *parent, struct device *self, void *aux)
tag = pci_make_tag(&icp->ic_pc, 0, IRONGATE_PCIHOST_DEV, 0);
- pba.pba_busname = "pci";
pba.pba_iot = &icp->ic_iot;
pba.pba_memt = &icp->ic_memt;
pba.pba_dmat =
@@ -192,7 +189,6 @@ irongate_attach(struct device *parent, struct device *self, void *aux)
if (pci_get_capability(&icp->ic_pc, tag, PCI_CAP_AGP,
NULL, NULL) != 0) {
- apa.apa_busname = "agp";
apa.apa_pci_args.pa_iot = pba.pba_iot;
apa.apa_pci_args.pa_memt = pba.pba_memt;
apa.apa_pci_args.pa_dmat = pba.pba_dmat;
@@ -207,23 +203,10 @@ irongate_attach(struct device *parent, struct device *self, void *aux)
irongate_conf_read0(icp, tag, PCI_CLASS_REG);
apa.apa_pci_args.pa_flags = pba.pba_flags;
- (void) config_found(self, &apa, irongate_print);
+ (void) config_found_ia(self, "agpbus", &apa, agpbusprint);
}
- (void) config_found(self, &pba, irongate_print);
-}
-
-int
-irongate_print(void *aux, const char *pnp)
-{
- struct pcibus_attach_args *pba = aux;
-
- /* Only PCIs can attach to Irongates; easy. */
- if (pnp != NULL)
- aprint_normal("%s at %s", pba->pba_busname, pnp);
- if (strcmp(pba->pba_busname, "pci") == 0)
- aprint_normal(" bus %d", pba->pba_bus);
- return (UNCONF);
+ (void) config_found_ia(self, "pcibus", &pba, pcibusprint);
}
int
diff --git a/sys/arch/alpha/pci/lca.c b/sys/arch/alpha/pci/lca.c
index d9bd21b1d18..3f6d86f917e 100644
--- a/sys/arch/alpha/pci/lca.c
+++ b/sys/arch/alpha/pci/lca.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lca.c,v 1.41 2003/06/15 23:08:55 fvdl Exp $ */
+/* $NetBSD: lca.c,v 1.42 2004/08/30 15:05:16 drochner Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: lca.c,v 1.41 2003/06/15 23:08:55 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lca.c,v 1.42 2004/08/30 15:05:16 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -108,8 +108,6 @@ CFATTACH_DECL(lca, sizeof(struct lca_softc),
extern struct cfdriver lca_cd;
-static int lcaprint __P((void *, const char *pnp));
-
int lca_bus_get_window __P((int, int,
struct alpha_bus_space_translation *));
@@ -244,7 +242,6 @@ lcaattach(parent, self, aux)
panic("lcaattach: shouldn't be here, really...");
}
- pba.pba_busname = "pci";
pba.pba_iot = &lcp->lc_iot;
pba.pba_memt = &lcp->lc_memt;
pba.pba_dmat =
@@ -255,21 +252,7 @@ lcaattach(parent, self, aux)
pba.pba_bridgetag = NULL;
pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED |
PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY | PCI_FLAGS_MWI_OKAY;
- config_found(self, &pba, lcaprint);
-}
-
-static int
-lcaprint(aux, pnp)
- void *aux;
- const char *pnp;
-{
- register struct pcibus_attach_args *pba = aux;
-
- /* only PCIs can attach to LCAes; easy. */
- if (pnp)
- aprint_normal("%s at %s", pba->pba_busname, pnp);
- aprint_normal(" bus %d", pba->pba_bus);
- return (UNCONF);
+ config_found_ia(self, "pcibus", &pba, pcibusprint);
}
int
diff --git a/sys/arch/alpha/pci/mcpcia.c b/sys/arch/alpha/pci/mcpcia.c
index d0a31ec60fb..e1c699a8980 100644
--- a/sys/arch/alpha/pci/mcpcia.c
+++ b/sys/arch/alpha/pci/mcpcia.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mcpcia.c,v 1.17 2003/06/15 23:08:55 fvdl Exp $ */
+/* $NetBSD: mcpcia.c,v 1.18 2004/08/30 15:05:16 drochner Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: mcpcia.c,v 1.17 2003/06/15 23:08:55 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mcpcia.c,v 1.18 2004/08/30 15:05:16 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -108,8 +108,6 @@ static void mcpciaattach __P((struct device *, struct device *, void *));
CFATTACH_DECL(mcpcia, sizeof(struct mcpcia_softc),
mcpciamatch, mcpciaattach, NULL, NULL);
-static int mcpciaprint __P((void *, const char *));
-
void mcpcia_init0 __P((struct mcpcia_config *, int));
/*
@@ -123,19 +121,6 @@ int mcpcia_bus_get_window __P((int, int,
struct alpha_bus_space_translation *abst));
static int
-mcpciaprint(aux, pnp)
- void *aux;
- const char *pnp;
-{
- register struct pcibus_attach_args *pba = aux;
- /* only PCIs can attach to MCPCIA for now */
- if (pnp)
- aprint_normal("%s at %s", pba->pba_busname, pnp);
- aprint_normal(" bus %d", pba->pba_bus);
- return (UNCONF);
-}
-
-static int
mcpciamatch(parent, cf, aux)
struct device *parent;
struct cfdata *cf;
@@ -207,7 +192,6 @@ mcpciaattach(parent, self, aux)
/*
* Attach PCI bus
*/
- pba.pba_busname = "pci";
pba.pba_iot = &ccp->cc_iot;
pba.pba_memt = &ccp->cc_memt;
pba.pba_dmat = /* start with direct, may change... */
@@ -218,7 +202,7 @@ mcpciaattach(parent, self, aux)
pba.pba_bridgetag = NULL;
pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED |
PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY | PCI_FLAGS_MWI_OKAY;
- (void) config_found(self, &pba, mcpciaprint);
+ (void) config_found_ia(self, "pcibus", &pba, pcibusprint);
/*
* Clear any errors that may have occurred during the probe
diff --git a/sys/arch/alpha/pci/sio.c b/sys/arch/alpha/pci/sio.c
index d423670913c..9e19f1cf033 100644
--- a/sys/arch/alpha/pci/sio.c
+++ b/sys/arch/alpha/pci/sio.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sio.c,v 1.37 2004/04/23 21:13:05 itojun Exp $ */
+/* $NetBSD: sio.c,v 1.38 2004/08/30 15:05:16 drochner Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: sio.c,v 1.37 2004/04/23 21:13:05 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sio.c,v 1.38 2004/08/30 15:05:16 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -121,12 +121,10 @@ CFATTACH_DECL(pceb, sizeof(struct sio_softc),
pcebmatch, sioattach, NULL, NULL);
union sio_attach_args {
- const char *sa_name; /* XXX should be common */
struct isabus_attach_args sa_iba;
struct eisabus_attach_args sa_eba;
};
-int sioprint __P((void *, const char *pnp));
void sio_isa_attach_hook __P((struct device *, struct device *,
struct isabus_attach_args *));
void sio_eisa_attach_hook __P((struct device *, struct device *,
@@ -237,13 +235,13 @@ sio_bridge_callback(self)
ec.ec_intr_disestablish = sio_intr_disestablish;
}
- sa.sa_eba.eba_busname = "eisa";
sa.sa_eba.eba_iot = sc->sc_iot;
sa.sa_eba.eba_memt = sc->sc_memt;
sa.sa_eba.eba_dmat =
alphabus_dma_get_tag(sc->sc_parent_dmat, ALPHA_BUS_EISA);
sa.sa_eba.eba_ec = &ec;
- config_found(&sc->sc_dv, &sa.sa_eba, sioprint);
+ config_found_ia(&sc->sc_dv, "eisabus", &sa.sa_eba,
+ eisabusprint);
}
/*
@@ -281,25 +279,12 @@ sio_bridge_callback(self)
sc->sc_ic->ic_intr_alloc = sio_intr_alloc;
}
- sa.sa_iba.iba_busname = "isa";
sa.sa_iba.iba_iot = sc->sc_iot;
sa.sa_iba.iba_memt = sc->sc_memt;
sa.sa_iba.iba_dmat =
alphabus_dma_get_tag(sc->sc_parent_dmat, ALPHA_BUS_ISA);
sa.sa_iba.iba_ic = sc->sc_ic;
- config_found(&sc->sc_dv, &sa.sa_iba, sioprint);
-}
-
-int
-sioprint(aux, pnp)
- void *aux;
- const char *pnp;
-{
- register union sio_attach_args *sa = aux;
-
- if (pnp)
- aprint_normal("%s at %s", sa->sa_name, pnp);
- return (UNCONF);
+ config_found_ia(&sc->sc_dv, "isabus", &sa.sa_iba, isabusprint);
}
void
diff --git a/sys/arch/alpha/pci/tsc.c b/sys/arch/alpha/pci/tsc.c
index 56d54883825..962efc58d8a 100644
--- a/sys/arch/alpha/pci/tsc.c
+++ b/sys/arch/alpha/pci/tsc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: tsc.c,v 1.11 2003/06/15 23:08:55 fvdl Exp $ */
+/* $NetBSD: tsc.c,v 1.12 2004/08/30 15:05:16 drochner Exp $ */
/*-
* Copyright (c) 1999 by Ross Harvey. All rights reserved.
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tsc.c,v 1.11 2003/06/15 23:08:55 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tsc.c,v 1.12 2004/08/30 15:05:16 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -79,8 +79,6 @@ CFATTACH_DECL(tsp, sizeof(struct tsp_softc),
extern struct cfdriver tsp_cd;
-static int tspprint __P((void *, const char *pnp));
-
static int tsp_bus_get_window __P((int, int,
struct alpha_bus_space_translation *));
@@ -190,7 +188,6 @@ tspattach(parent, self, aux)
pci_6600_pickintr(pcp);
- pba.pba_busname = "pci";
pba.pba_iot = &pcp->pc_iot;
pba.pba_memt = &pcp->pc_memt;
pba.pba_dmat =
@@ -201,7 +198,7 @@ tspattach(parent, self, aux)
pba.pba_bridgetag = NULL;
pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED |
PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY | PCI_FLAGS_MWI_OKAY;
- config_found(self, &pba, tspprint);
+ config_found_ia(self, "pcibus", &pba, pcibusprint);
}
struct tsp_config *
@@ -232,19 +229,6 @@ tsp_init(mallocsafe, n)
}
static int
-tspprint(aux, p)
- void *aux;
- const char *p;
-{
- register struct pcibus_attach_args *pci = aux;
-
- if(p)
- aprint_normal("%s at %s", pci->pba_busname, p);
- aprint_normal(" bus %d", pci->pba_bus);
- return UNCONF;
-}
-
-static int
tsp_bus_get_window(type, window, abst)
int type, window;
struct alpha_bus_space_translation *abst;
diff --git a/sys/arch/alpha/pci/ttwoga.c b/sys/arch/alpha/pci/ttwoga.c
index d2f527604cb..76b9c3e6e4b 100644
--- a/sys/arch/alpha/pci/ttwoga.c
+++ b/sys/arch/alpha/pci/ttwoga.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ttwoga.c,v 1.7 2003/06/15 23:08:55 fvdl Exp $ */
+/* $NetBSD: ttwoga.c,v 1.8 2004/08/30 15:05:16 drochner Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: ttwoga.c,v 1.7 2003/06/15 23:08:55 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ttwoga.c,v 1.8 2004/08/30 15:05:16 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -81,7 +81,7 @@ void ttwopciattach(struct device *, struct device *, void *);
CFATTACH_DECL(ttwopci, sizeof(struct device),
ttwopcimatch, ttwopciattach, NULL, NULL);
-int ttwopciprint(void *, const char *);
+int ttwosableioprint(void *, const char *);
/*
* There can be only one, but it might have 2 primary PCI busses.
@@ -148,10 +148,9 @@ ttwogaattach(struct device *parent, struct device *self, void *aux)
continue;
#endif
memset(&pba, 0, sizeof(pba));
- pba.pba_busname = "ttwopci";
pba.pba_bus = hose;
- (void) config_found(self, &pba, ttwogaprint);
+ (void) config_found_ia(self, "ttwoga", &pba, ttwogaprint);
}
}
@@ -161,7 +160,7 @@ ttwogaprint(void *aux, const char *pnp)
struct pcibus_attach_args *pba = aux;
if (pnp)
- aprint_normal("%s at %s", pba->pba_busname, pnp);
+ aprint_normal("ttwopci at %s", pnp);
aprint_normal(" hose %d", pba->pba_bus);
return (UNCONF);
}
@@ -215,9 +214,6 @@ ttwopcimatch(struct device *parent, struct cfdata *match, void *aux)
{
struct pcibus_attach_args *pba = aux;
- if (strcmp(pba->pba_busname, match->cf_name) != 0)
- return (0);
-
if (match->cf_loc[PCIBUSCF_BUS] != PCIBUSCF_BUS_DEFAULT &&
match->cf_loc[PCIBUSCF_BUS] != pba->pba_bus)
return (0);
@@ -274,21 +270,20 @@ ttwopciattach(struct device *parent, struct device *self, void *aux)
* Hose 0 has the STDIO module.
*/
if (pba->pba_bus == 0) {
- npba.pba_busname = "sableio";
- (void) config_found(self, &npba, ttwopciprint);
+ (void) config_found_ia(self, "sableiobus", &npba,
+ ttwosableioprint);
}
- npba.pba_busname = "pci";
- (void) config_found(self, &npba, ttwopciprint);
+ (void) config_found_ia(self, "pcibus", &npba, pcibusprint);
}
int
-ttwopciprint(void *aux, const char *pnp)
+ttwosableioprint(void *aux, const char *pnp)
{
struct pcibus_attach_args *pba = aux;
if (pnp)
- aprint_normal("%s at %s", pba->pba_busname, pnp);
+ aprint_normal("sableio at %s", pnp);
aprint_normal(" bus %d", pba->pba_bus);
return (UNCONF);
}
diff --git a/sys/arch/alpha/sableio/sableio.c b/sys/arch/alpha/sableio/sableio.c
index 6cf089880e7..dff4c86ebe1 100644
--- a/sys/arch/alpha/sableio/sableio.c
+++ b/sys/arch/alpha/sableio/sableio.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sableio.c,v 1.6 2003/01/01 00:39:20 thorpej Exp $ */
+/* $NetBSD: sableio.c,v 1.7 2004/08/30 15:05:16 drochner Exp $ */
/*-
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -55,7 +55,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: sableio.c,v 1.6 2003/01/01 00:39:20 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sableio.c,v 1.7 2004/08/30 15:05:16 drochner Exp $");
#include "isadma.h"
@@ -118,9 +118,6 @@ sableio_match(struct device *parent, struct cfdata *cf, void *aux)
{
struct pcibus_attach_args *pba = aux;
- if (strcmp(pba->pba_busname, cf->cf_name) != 0)
- return (0);
-
/*
* These are really ISA devices, and thus must be on
* PCI bus 0.
diff --git a/sys/arch/amd64/amd64/mainbus.c b/sys/arch/amd64/amd64/mainbus.c
index f68adbac59b..2bf131e18ac 100644
--- a/sys/arch/amd64/amd64/mainbus.c
+++ b/sys/arch/amd64/amd64/mainbus.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mainbus.c,v 1.7 2003/07/14 23:32:31 lukem Exp $ */
+/* $NetBSD: mainbus.c,v 1.8 2004/08/30 15:05:16 drochner Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.7 2003/07/14 23:32:31 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.8 2004/08/30 15:05:16 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -187,7 +187,7 @@ mainbus_attach(parent, self, aux)
caa.cpu_role = CPU_ROLE_SP;
caa.cpu_func = 0;
- config_found(self, &caa, mainbus_print);
+ config_found_ia(self, "cpubus", &caa, mainbus_print);
}
}
@@ -211,13 +211,12 @@ mainbus_attach(parent, self, aux)
PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY |
PCI_FLAGS_MWI_OKAY;
mba.mba_acpi.aa_ic = &x86_isa_chipset;
- config_found(self, &mba.mba_acpi, mainbus_print);
+ config_found_ia(self, "acpibus", &mba.mba_acpi, mainbus_print);
}
#endif
#if NPCI > 0
if (pci_mode != 0) {
- mba.mba_pba.pba_busname = "pci";
mba.mba_pba.pba_iot = X86_BUS_SPACE_IO;
mba.mba_pba.pba_memt = X86_BUS_SPACE_MEM;
mba.mba_pba.pba_dmat = &pci_bus_dma_tag;
@@ -228,22 +227,22 @@ mainbus_attach(parent, self, aux)
mba.mba_pba.pba_bridgetag = NULL;
#if defined(MPACPI) && defined(MPACPI_SCANPCI)
if (mpacpi_active)
- mpacpi_scan_pci(self, &mba.mba_pba, mainbus_print);
+ mpacpi_scan_pci(self, &mba.mba_pba, pcibusprint);
else
#endif
#if defined(MPBIOS) && defined(MPBIOS_SCANPCI)
if (mpbios_scanned != 0)
- mpbios_scan_pci(self, &mba.mba_pba, mainbus_print);
+ mpbios_scan_pci(self, &mba.mba_pba, pcibusprint);
else
#endif
- config_found(self, &mba.mba_pba, mainbus_print);
+ config_found_ia(self, "pcibus", &mba.mba_pba, pcibusprint);
}
#endif
#if NISA > 0
if (isa_has_been_seen == 0)
- config_found(self, &mba_iba, mainbus_print);
+ config_found_ia(self, "isabus", &mba_iba, isabusprint);
#endif
}
@@ -257,7 +256,5 @@ mainbus_print(aux, pnp)
if (pnp)
aprint_normal("%s at %s", mba->mba_busname, pnp);
- if (strcmp(mba->mba_busname, "pci") == 0)
- aprint_normal(" bus %d", mba->mba_pba.pba_bus);
return (UNCONF);
}
diff --git a/sys/arch/amd64/conf/files.amd64 b/sys/arch/amd64/conf/files.amd64
index 6cb6abc693c..85734dca4fa 100644
--- a/sys/arch/amd64/conf/files.amd64
+++ b/sys/arch/amd64/conf/files.amd64
@@ -1,4 +1,4 @@
-# $NetBSD: files.amd64,v 1.12 2004/04/18 18:36:56 fvdl Exp $
+# $NetBSD: files.amd64,v 1.13 2004/08/30 15:05:16 drochner Exp $
#
# new style config file for amd64 architecture
#
@@ -90,13 +90,13 @@ file arch/amd64/amd64/bios32.c bios32 needs-flag
#
# XXX BIOS32 only if something that uses it is configured!
-device mainbus: isabus, pcibus, mainbus, bios32, acpibus
+device mainbus: isabus, pcibus, bios32, acpibus, cpubus
attach mainbus at root
file arch/amd64/amd64/mainbus.c mainbus
define cpu { [apid = -1] }
device cpu
-attach cpu at mainbus
+attach cpu at cpubus
file arch/amd64/amd64/cpu.c cpu
#
diff --git a/sys/arch/amd64/pci/pchb.c b/sys/arch/amd64/pci/pchb.c
index 0e0313422c2..e7e23227fd7 100644
--- a/sys/arch/amd64/pci/pchb.c
+++ b/sys/arch/amd64/pci/pchb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pchb.c,v 1.3 2004/04/23 21:13:05 itojun Exp $ */
+/* $NetBSD: pchb.c,v 1.4 2004/08/30 15:05:16 drochner Exp $ */
/*-
* Copyright (c) 1996, 1998, 2000 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pchb.c,v 1.3 2004/04/23 21:13:05 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pchb.c,v 1.4 2004/08/30 15:05:16 drochner Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -78,8 +78,6 @@ __KERNEL_RCSID(0, "$NetBSD: pchb.c,v 1.3 2004/04/23 21:13:05 itojun Exp $");
int pchbmatch __P((struct device *, struct cfdata *, void *));
void pchbattach __P((struct device *, struct device *, void *));
-int pchb_print __P((void *, const char *));
-
CFATTACH_DECL(pchb, sizeof(struct pchb_softc),
pchbmatch, pchbattach, NULL, NULL);
@@ -124,16 +122,3 @@ pchbattach(parent, self, aux)
}
}
-
-int
-pchb_print(aux, pnp)
- void *aux;
- const char *pnp;
-{
- struct pcibus_attach_args *pba = aux;
-
- if (pnp)
- aprint_normal("%s at %s", pba->pba_busname, pnp);
- aprint_normal(" bus %d", pba->pba_bus);
- return (UNCONF);
-}
diff --git a/sys/arch/amd64/pci/pcib.c b/sys/arch/amd64/pci/pcib.c
index e7c1477658e..78615253610 100644
--- a/sys/arch/amd64/pci/pcib.c
+++ b/sys/arch/amd64/pci/pcib.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pcib.c,v 1.3 2004/04/23 21:13:05 itojun Exp $ */
+/* $NetBSD: pcib.c,v 1.4 2004/08/30 15:05:16 drochner Exp $ */
/*-
* Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.3 2004/04/23 21:13:05 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.4 2004/08/30 15:05:16 drochner Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -62,7 +62,6 @@ CFATTACH_DECL(pcib, sizeof(struct device),
pcibmatch, pcibattach, NULL, NULL);
void pcib_callback __P((struct device *));
-int pcib_print __P((void *, const char *));
int
pcibmatch(parent, match, aux)
@@ -201,23 +200,10 @@ pcib_callback(self)
* Attach the ISA bus behind this bridge.
*/
memset(&iba, 0, sizeof(iba));
- iba.iba_busname = "isa";
iba.iba_iot = X86_BUS_SPACE_IO;
iba.iba_memt = X86_BUS_SPACE_MEM;
#if NISA > 0
iba.iba_dmat = &isa_bus_dma_tag;
#endif
- config_found(self, &iba, pcib_print);
-}
-
-int
-pcib_print(aux, pnp)
- void *aux;
- const char *pnp;
-{
-
- /* Only ISAs can attach to pcib's; easy. */
- if (pnp)
- aprint_normal("isa at %s", pnp);
- return (UNCONF);
+ config_found_ia(self, "isabus", &iba, isabusprint);
}
diff --git a/sys/arch/arc/isa/isabus.c b/sys/arch/arc/isa/isabus.c
index 58836ddd724..70ae535fc5f 100644
--- a/sys/arch/arc/isa/isabus.c
+++ b/sys/arch/arc/isa/isabus.c
@@ -1,4 +1,4 @@
-/* $NetBSD: isabus.c,v 1.25 2003/08/07 16:26:50 agc Exp $ */
+/* $NetBSD: isabus.c,v 1.26 2004/08/30 15:05:16 drochner 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.25 2003/08/07 16:26:50 agc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isabus.c,v 1.26 2004/08/30 15:05:16 drochner Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -201,12 +201,11 @@ isabrattach(sc)
arc_bus_space_init_extent(&arc_bus_io, (caddr_t)isa_io_ex_storage,
sizeof(isa_io_ex_storage));
- iba.iba_busname = "isa";
iba.iba_iot = &arc_bus_io;
iba.iba_memt = &arc_bus_mem;
iba.iba_dmat = &sc->sc_dmat;
iba.iba_ic = &sc->arc_isa_cs;
- config_found(&sc->sc_dev, &iba, isabrprint);
+ config_found_ia(&sc->sc_dev, "isabus", &iba, isabrprint);
}
int
@@ -214,10 +213,9 @@ isabrprint(aux, pnp)
void *aux;
const char *pnp;
{
- struct confargs *ca = aux;
if (pnp)
- aprint_normal("%s at %s", ca->ca_name, pnp);
+ aprint_normal("isa at %s", pnp);
aprint_verbose(" isa_io_base 0x%lx isa_mem_base 0x%lx",
arc_bus_io.bs_vbase, arc_bus_mem.bs_vbase);
return (UNCONF);
diff --git a/sys/arch/arc/pci/necpb.c b/sys/arch/arc/pci/necpb.c
index b967289539a..3eb96358e5a 100644
--- a/sys/arch/arc/pci/necpb.c
+++ b/sys/arch/arc/pci/necpb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: necpb.c,v 1.17 2003/11/01 19:23:52 tsutsui Exp $ */
+/* $NetBSD: necpb.c,v 1.18 2004/08/30 15:05:16 drochner Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: necpb.c,v 1.17 2003/11/01 19:23:52 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: necpb.c,v 1.18 2004/08/30 15:05:16 drochner Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -99,8 +99,6 @@ __KERNEL_RCSID(0, "$NetBSD: necpb.c,v 1.17 2003/11/01 19:23:52 tsutsui Exp $");
int necpbmatch __P((struct device *, struct cfdata *, void *));
void necpbattach __P((struct device *, struct device *, void *));
-static int necpbprint __P((void *, const char *));
-
void necpb_attach_hook __P((struct device *, struct device *,
struct pcibus_attach_args *));
int necpb_bus_maxdevs __P((pci_chipset_tag_t, int));
@@ -239,7 +237,6 @@ necpbattach(parent, self, aux)
(*platform->set_intr)(MIPS_INT_MASK_2, necpb_intr, 3);
- pba.pba_busname = "pci";
pba.pba_iot = &sc->sc_ncp->nc_iot;
pba.pba_memt = &sc->sc_ncp->nc_memt;
pba.pba_dmat = &sc->sc_ncp->nc_dmat;
@@ -249,20 +246,7 @@ necpbattach(parent, self, aux)
pba.pba_bus = 0;
pba.pba_bridgetag = NULL;
- config_found(self, &pba, necpbprint);
-}
-
-static int
-necpbprint(aux, pnp)
- void *aux;
- const char *pnp;
-{
- struct pcibus_attach_args *pba = aux;
-
- if (pnp)
- aprint_normal("%s at %s", pba->pba_busname, pnp);
- aprint_normal(" bus %d", pba->pba_bus);
- return (UNCONF);
+ config_found_ia(self, "pcibus", &pba, pcibusprint);
}
void
diff --git a/sys/arch/arm/footbridge/footbridge.c b/sys/arch/arm/footbridge/footbridge.c
index 29c30a76aa6..94d6b36c3dd 100644
--- a/sys/arch/arm/footbridge/footbridge.c
+++ b/sys/arch/arm/footbridge/footbridge.c
@@ -1,4 +1,4 @@
-/* $NetBSD: footbridge.c,v 1.14 2003/06/15 23:08:56 fvdl Exp $ */
+/* $NetBSD: footbridge.c,v 1.15 2004/08/30 15:05:16 drochner Exp $ */
/*
* Copyright (c) 1997,1998 Mark Brinicombe.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: footbridge.c,v 1.14 2003/06/15 23:08:56 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: footbridge.c,v 1.15 2004/08/30 15:05:16 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -120,8 +120,6 @@ footbridge_print(aux, pnp)
if (pnp)
aprint_normal("%s at %s", fba->fba_name, pnp);
- if (strcmp(fba->fba_name, "pci") == 0)
- aprint_normal(" bus %d", fba->fba_pba.pba_bus);
return(UNCONF);
}
@@ -208,7 +206,6 @@ footbridge_attach(parent, self, aux)
/* calibrate the delay loop */
calibrate_delay();
/* Attach the PCI bus */
- fba.fba_pba.pba_busname = "pci";
fba.fba_pba.pba_pc = &footbridge_pci_chipset;
fba.fba_pba.pba_iot = &footbridge_pci_io_bs_tag;
fba.fba_pba.pba_memt = &footbridge_pci_mem_bs_tag;
@@ -217,7 +214,7 @@ footbridge_attach(parent, self, aux)
fba.fba_pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED;
fba.fba_pba.pba_bus = 0;
fba.fba_pba.pba_bridgetag = NULL;
- config_found(self, &fba.fba_pba, footbridge_print);
+ config_found_ia(self, "pcibus", &fba.fba_pba, pcibusprint);
/* Attach a time-of-day clock device */
fba.fba_tca.ta_name = "todclock";
@@ -225,7 +222,7 @@ footbridge_attach(parent, self, aux)
fba.fba_tca.ta_rtc_write = NULL;
fba.fba_tca.ta_rtc_read = NULL;
fba.fba_tca.ta_flags = TODCLOCK_FLAG_FAKE;
- config_found(self, &fba.fba_tca, footbridge_print);
+ config_found_ia(self, "todservice", &fba.fba_tca, footbridge_print);
/* Attach uart device */
fba.fba_fca.fca_name = "fcom";
@@ -233,7 +230,7 @@ footbridge_attach(parent, self, aux)
fba.fba_fca.fca_ioh = sc->sc_ioh;
fba.fba_fca.fca_rx_irq = IRQ_SERIAL_RX;
fba.fba_fca.fca_tx_irq = IRQ_SERIAL_TX;
- config_found(self, &fba.fba_fca, footbridge_print);
+ config_found_ia(self, "footbridge", &fba.fba_fca, footbridge_print);
/* Setup fast SA110 cache clean area */
#ifdef CPU_SA110
diff --git a/sys/arch/arm/ixp12x0/ixp12x0.c b/sys/arch/arm/ixp12x0/ixp12x0.c
index dd7e6ea4a57..f689fdfad49 100644
--- a/sys/arch/arm/ixp12x0/ixp12x0.c
+++ b/sys/arch/arm/ixp12x0/ixp12x0.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ixp12x0.c,v 1.12 2003/09/15 05:11:31 ichiro Exp $ */
+/* $NetBSD: ixp12x0.c,v 1.13 2004/08/30 15:05:16 drochner Exp $ */
/*
* Copyright (c) 2002, 2003
* Ichiro FUKUHARA <ichiro@ichiro.org>.
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixp12x0.c,v 1.12 2003/09/15 05:11:31 ichiro Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixp12x0.c,v 1.13 2004/08/30 15:05:16 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -46,8 +46,6 @@ __KERNEL_RCSID(0, "$NetBSD: ixp12x0.c,v 1.12 2003/09/15 05:11:31 ichiro Exp $");
#include <arm/ixp12x0/ixp12x0var.h>
#include <arm/ixp12x0/ixp12x0_pcireg.h>
-int ixp12x0_pcibus_print(void *, const char *);
-
static struct ixp12x0_softc *ixp12x0_softc;
void
@@ -175,7 +173,6 @@ ixp12x0_attach(sc)
/*
* Attach the PCI bus.
*/
- pba.pba_busname = "pci";
pba.pba_pc = &sc->ia_pci_chipset;
pba.pba_iot = &ixp12x0_bs_tag;
pba.pba_memt = &ixp12x0_bs_tag;
@@ -186,20 +183,7 @@ ixp12x0_attach(sc)
pba.pba_intrtag = 0;
pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED |
PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY | PCI_FLAGS_MWI_OKAY;
- (void) config_found(&sc->sc_dev, &pba, ixp12x0_pcibus_print);
-}
-
-int
-ixp12x0_pcibus_print(void *aux, const char *pnp)
-{
- struct pcibus_attach_args *pba = aux;
-
- if (pnp)
- aprint_normal("%s at %s", pba->pba_busname, pnp);
-
- aprint_normal(" bus %d", pba->pba_bus);
-
- return (UNCONF);
+ (void) config_found_ia(&sc->sc_dev, "pcibus", &pba, pcibusprint);
}
void
diff --git a/sys/arch/arm/s3c2xx0/s3c2800_pci.c b/sys/arch/arm/s3c2xx0/s3c2800_pci.c
index b2ff52de512..4292e93bcc6 100644
--- a/sys/arch/arm/s3c2xx0/s3c2800_pci.c
+++ b/sys/arch/arm/s3c2xx0/s3c2800_pci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: s3c2800_pci.c,v 1.8 2004/04/24 15:49:00 kleink Exp $ */
+/* $NetBSD: s3c2800_pci.c,v 1.9 2004/08/30 15:05:16 drochner Exp $ */
/*
* Copyright (c) 2002 Fujitsu Component Limited
@@ -100,7 +100,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: s3c2800_pci.c,v 1.8 2004/04/24 15:49:00 kleink Exp $");
+__KERNEL_RCSID(0, "$NetBSD: s3c2800_pci.c,v 1.9 2004/08/30 15:05:16 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -221,19 +221,6 @@ sspci_match(struct device *parent, struct cfdata *match, void *aux)
return 1;
}
-static int
-sspci_print(void *aux, const char *pnp)
-{
- struct pcibus_attach_args *pci_pba = (struct pcibus_attach_args *) aux;
-
- if (pnp)
- aprint_normal("%s at %s", pci_pba->pba_busname, pnp);
- if (strcmp(pci_pba->pba_busname, "pci") == 0)
- aprint_normal(" bus %d", pci_pba->pba_bus);
-
- return UNCONF;
-}
-
static void
sspci_attach(struct device *parent, struct device *self, void *aux)
{
@@ -332,7 +319,6 @@ sspci_attach(struct device *parent, struct device *self, void *aux)
/* Platform provides PCI DMA tag */
pci_dma_tag = s3c2800_pci_dma_init();
- pci_pba.pba_busname = "pci";
pci_pba.pba_pc = &sspci_chipset;
pci_pba.pba_iot = &sspci_io_tag;
pci_pba.pba_memt = &sspci_mem_tag;
@@ -342,7 +328,7 @@ sspci_attach(struct device *parent, struct device *self, void *aux)
pci_pba.pba_bus = 0;
pci_pba.pba_bridgetag = NULL;
- config_found(self, &pci_pba, sspci_print);
+ config_found_ia(self, "pcibus", &pci_pba, pcibusprint);
return;
diff --git a/sys/arch/arm/xscale/becc.c b/sys/arch/arm/xscale/becc.c
index 346b33ec6d3..5db877c04bd 100644
--- a/sys/arch/arm/xscale/becc.c
+++ b/sys/arch/arm/xscale/becc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: becc.c,v 1.7 2003/07/15 00:24:52 lukem Exp $ */
+/* $NetBSD: becc.c,v 1.8 2004/08/30 15:05:16 drochner Exp $ */
/*
* Copyright (c) 2002, 2003 Wasabi Systems, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: becc.c,v 1.7 2003/07/15 00:24:52 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: becc.c,v 1.8 2004/08/30 15:05:16 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -77,8 +77,6 @@ const char *becc_revisions[] = {
*/
struct becc_softc *becc_softc;
-static int becc_pcibus_print(void *, const char *);
-
static int becc_search(struct device *, struct cfdata *, void *);
static int becc_print(void *, const char *);
@@ -200,7 +198,6 @@ becc_attach(struct becc_softc *sc)
/*
* Attach the PCI bus.
*/
- pba.pba_busname = "pci";
pba.pba_iot = &sc->sc_pci_iot;
pba.pba_memt = &sc->sc_pci_memt;
pba.pba_dmat = &sc->sc_pci_dmat;
@@ -212,26 +209,7 @@ becc_attach(struct becc_softc *sc)
pba.pba_intrtag = 0;
pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED |
PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY | PCI_FLAGS_MWI_OKAY;
- (void) config_found(&sc->sc_dev, &pba, becc_pcibus_print);
-}
-
-/*
- * becc_pcibus_print:
- *
- * Autoconfiguration cfprint routine when attaching
- * to the "pcibus" attribute.
- */
-static int
-becc_pcibus_print(void *aux, const char *pnp)
-{
- struct pcibus_attach_args *pba = aux;
-
- if (pnp)
- aprint_normal("%s at %s", pba->pba_busname, pnp);
-
- aprint_normal(" bus %d", pba->pba_bus);
-
- return (UNCONF);
+ (void) config_found_ia(&sc->sc_dev, "pcibus", &pba, pcibusprint);
}
/*
diff --git a/sys/arch/arm/xscale/i80312.c b/sys/arch/arm/xscale/i80312.c
index 9be5f7064e4..d7caf43dfb7 100644
--- a/sys/arch/arm/xscale/i80312.c
+++ b/sys/arch/arm/xscale/i80312.c
@@ -1,4 +1,4 @@
-/* $NetBSD: i80312.c,v 1.16 2003/10/06 16:06:05 thorpej Exp $ */
+/* $NetBSD: i80312.c,v 1.17 2004/08/30 15:05:16 drochner Exp $ */
/*
* Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i80312.c,v 1.16 2003/10/06 16:06:05 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i80312.c,v 1.17 2004/08/30 15:05:16 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -71,7 +71,6 @@ static void i80312_pci_dma_init(struct i80312_softc *);
static void i80312_local_dma_init(struct i80312_softc *);
static int i80312_iopxs_print(void *, const char *);
-static int i80312_pcibus_print(void *, const char *);
/* Built-in devices. */
static const struct iopxs_device {
@@ -297,7 +296,7 @@ i80312_attach(struct i80312_softc *sc)
ia.ia_offset = id->id_offset;
ia.ia_size = id->id_size;
- (void) config_found(&sc->sc_dev, &ia, i80312_iopxs_print);
+ (void) config_found_ia(&sc->sc_dev, "iopxs", &ia, i80312_iopxs_print);
}
/*
@@ -308,7 +307,6 @@ i80312_attach(struct i80312_softc *sc)
* space.
*/
preg = bus_space_read_4(sc->sc_st, sc->sc_ppb_sh, PPB_REG_BUSINFO);
- pba.pba_busname = "pci";
pba.pba_iot = &sc->sc_pci_iot;
pba.pba_memt = &sc->sc_pci_memt;
pba.pba_dmat = &sc->sc_pci_dmat;
@@ -321,7 +319,7 @@ i80312_attach(struct i80312_softc *sc)
/* XXX MRL/MRM/MWI seem to have problems, at the moment. */
pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED /* |
PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY | PCI_FLAGS_MWI_OKAY */;
- (void) config_found(&sc->sc_dev, &pba, i80312_pcibus_print);
+ (void) config_found_ia(&sc->sc_dev, "pcibus", &pba, pcibusprint);
}
/*
@@ -338,25 +336,6 @@ i80312_iopxs_print(void *aux, const char *pnp)
}
/*
- * i80312_pcibus_print:
- *
- * Autoconfiguration cfprint routine when attaching
- * to the "pcibus" attribute.
- */
-static int
-i80312_pcibus_print(void *aux, const char *pnp)
-{
- struct pcibus_attach_args *pba = aux;
-
- if (pnp)
- aprint_normal("%s at %s", pba->pba_busname, pnp);
-
- aprint_normal(" bus %d", pba->pba_bus);
-
- return (UNCONF);
-}
-
-/*
* i80312_pci_dma_init:
*
* Initialize the PCI DMA tag.
diff --git a/sys/arch/arm/xscale/i80321.c b/sys/arch/arm/xscale/i80321.c
index 7d3ee176cba..5d262009e3b 100644
--- a/sys/arch/arm/xscale/i80321.c
+++ b/sys/arch/arm/xscale/i80321.c
@@ -1,4 +1,4 @@
-/* $NetBSD: i80321.c,v 1.15 2003/10/06 16:06:05 thorpej Exp $ */
+/* $NetBSD: i80321.c,v 1.16 2004/08/30 15:05:16 drochner Exp $ */
/*
* Copyright (c) 2002 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i80321.c,v 1.15 2003/10/06 16:06:05 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i80321.c,v 1.16 2004/08/30 15:05:16 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -66,7 +66,6 @@ struct bus_space i80321_bs_tag;
struct i80321_softc *i80321_softc;
static int i80321_iopxs_print(void *, const char *);
-static int i80321_pcibus_print(void *, const char *);
/* Built-in devices. */
static const struct iopxs_device {
@@ -260,7 +259,8 @@ i80321_attach(struct i80321_softc *sc)
ia.ia_offset = id->id_offset;
ia.ia_size = id->id_size;
- (void) config_found(&sc->sc_dev, &ia, i80321_iopxs_print);
+ (void) config_found_ia(&sc->sc_dev, "iopxs", &ia,
+ i80321_iopxs_print);
}
/*
@@ -270,7 +270,6 @@ i80321_attach(struct i80321_softc *sc)
preg = PCIXSR_BUSNO(preg);
if (preg == 0xff)
preg = 0;
- pba.pba_busname = "pci";
pba.pba_iot = &sc->sc_pci_iot;
pba.pba_memt = &sc->sc_pci_memt;
pba.pba_dmat = &sc->sc_pci_dmat;
@@ -282,7 +281,7 @@ i80321_attach(struct i80321_softc *sc)
pba.pba_intrtag = 0;
pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED |
PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY | PCI_FLAGS_MWI_OKAY;
- (void) config_found(&sc->sc_dev, &pba, i80321_pcibus_print);
+ (void) config_found_ia(&sc->sc_dev, "pcibus", &pba, pcibusprint);
}
/*
@@ -299,25 +298,6 @@ i80321_iopxs_print(void *aux, const char *pnp)
}
/*
- * i80321_pcibus_print:
- *
- * Autoconfiguration cfprint routine when attaching
- * to the "pcibus" attribute.
- */
-static int
-i80321_pcibus_print(void *aux, const char *pnp)
-{
- struct pcibus_attach_args *pba = aux;
-
- if (pnp)
- aprint_normal("%s at %s", pba->pba_busname, pnp);
-
- aprint_normal(" bus %d", pba->pba_bus);
-
- return (UNCONF);
-}
-
-/*
* i80321_pci_dma_init:
*
* Initialize the PCI DMA tag.
diff --git a/sys/arch/arm/xscale/ixp425.c b/sys/arch/arm/xscale/ixp425.c
index 0a4c4d822e2..7a9ebba8aae 100644
--- a/sys/arch/arm/xscale/ixp425.c
+++ b/sys/arch/arm/xscale/ixp425.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ixp425.c,v 1.8 2003/11/02 21:24:39 scw Exp $ */
+/* $NetBSD: ixp425.c,v 1.9 2004/08/30 15:05:16 drochner Exp $ */
/*
* Copyright (c) 2003
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixp425.c,v 1.8 2003/11/02 21:24:39 scw Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixp425.c,v 1.9 2004/08/30 15:05:16 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -46,7 +46,6 @@ __KERNEL_RCSID(0, "$NetBSD: ixp425.c,v 1.8 2003/11/02 21:24:39 scw Exp $");
#include <arm/xscale/ixp425reg.h>
#include <arm/xscale/ixp425var.h>
-int ixp425_pcibus_print(void *, const char *);
struct ixp425_softc *ixp425_softc;
void
@@ -92,7 +91,6 @@ ixp425_attach(struct ixp425_softc *sc)
/*
* Attach the PCI bus.
*/
- pba.pba_busname = "pci";
pba.pba_pc = &sc->ia_pci_chipset;
pba.pba_iot = &sc->sc_pci_iot;
pba.pba_memt = &sc->sc_pci_memt;
@@ -104,18 +102,5 @@ ixp425_attach(struct ixp425_softc *sc)
pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED |
PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY |
PCI_FLAGS_MWI_OKAY;
- (void) config_found(&sc->sc_dev, &pba, ixp425_pcibus_print);
-}
-
-int
-ixp425_pcibus_print(void *aux, const char *pnp)
-{
- struct pcibus_attach_args *pba = aux;
-
- if (pnp)
- aprint_normal("%s at %s", pba->pba_busname, pnp);
-
- aprint_normal(" bus %d", pba->pba_bus);
-
- return (UNCONF);
+ (void) config_found_ia(&sc->sc_dev, "pcibus", &pba, pcibusprint);
}
diff --git a/sys/arch/atari/isa/isa_machdep.c b/sys/arch/atari/isa/isa_machdep.c
index 0b751fd17c8..08c59342cf9 100644
--- a/sys/arch/atari/isa/isa_machdep.c
+++ b/sys/arch/atari/isa/isa_machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: isa_machdep.c,v 1.27 2003/07/15 01:19:54 lukem Exp $ */
+/* $NetBSD: isa_machdep.c,v 1.28 2004/08/30 15:05:16 drochner Exp $ */
/*
* Copyright (c) 1997 Leo Weppelman. All rights reserved.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.27 2003/07/15 01:19:54 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.28 2004/08/30 15:05:16 drochner Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -68,7 +68,7 @@ struct atari_bus_dma_tag isa_bus_dma_tag = {
};
#endif /* NISADMA == 0 */
-static int isabusprint __P((void *auxp, const char *));
+static int atariisabusprint __P((void *auxp, const char *));
static int isabusmatch __P((struct device *, struct cfdata *, void *));
static void isabusattach __P((struct device *, struct device *, void *));
@@ -122,7 +122,6 @@ void *auxp;
extern struct atari_bus_dma_tag isa_bus_dma_tag;
extern void isa_bus_init(void);
- iba.iba_busname = "isa";
iba.iba_dmat = &isa_bus_dma_tag;
iba.iba_iot = leb_alloc_bus_space_tag(&bs_storage[0]);
iba.iba_memt = leb_alloc_bus_space_tag(&bs_storage[1]);
@@ -145,11 +144,11 @@ void *auxp;
}
printf("\n");
- config_found(dp, &iba, isabusprint);
+ config_found_ia(dp, "isabus", &iba, atariisabusprint);
}
int
-isabusprint(auxp, name)
+atariisabusprint(auxp, name)
void *auxp;
const char *name;
{
diff --git a/sys/arch/atari/pci/pci_machdep.c b/sys/arch/atari/pci/pci_machdep.c
index aafb96497b6..252c1a7c116 100644
--- a/sys/arch/atari/pci/pci_machdep.c
+++ b/sys/arch/atari/pci/pci_machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.c,v 1.41 2003/11/10 08:51:51 wiz Exp $ */
+/* $NetBSD: pci_machdep.c,v 1.42 2004/08/30 15:05:16 drochner Exp $ */
/*
* Copyright (c) 1996 Leo Weppelman. All rights reserved.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.41 2003/11/10 08:51:51 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.42 2004/08/30 15:05:16 drochner Exp $");
#include "opt_mbtype.h"
@@ -120,7 +120,7 @@ struct atari_bus_dma_tag pci_bus_dma_tag = {
_bus_dmamap_sync,
};
-int pcibusprint __P((void *auxp, const char *));
+int ataripcibusprint __P((void *auxp, const char *));
int pcibusmatch __P((struct device *, struct cfdata *, void *));
void pcibusattach __P((struct device *, struct device *, void *));
@@ -171,7 +171,6 @@ void *auxp;
{
struct pcibus_attach_args pba;
- pba.pba_busname = "pci";
pba.pba_pc = NULL;
pba.pba_bus = 0;
pba.pba_bridgetag = NULL;
@@ -204,11 +203,11 @@ void *auxp;
printf("\n");
- config_found(dp, &pba, pcibusprint);
+ config_found_ia(dp, "pcibus", &pba, ataripcibusprint);
}
int
-pcibusprint(auxp, name)
+ataripcibusprint(auxp, name)
void *auxp;
const char *name;
{
diff --git a/sys/arch/bebox/bebox/mainbus.c b/sys/arch/bebox/bebox/mainbus.c
index 66a7cdfb36e..eb82c9e3224 100644
--- a/sys/arch/bebox/bebox/mainbus.c
+++ b/sys/arch/bebox/bebox/mainbus.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mainbus.c,v 1.17 2003/07/15 01:26:30 lukem Exp $ */
+/* $NetBSD: mainbus.c,v 1.18 2004/08/30 15:05:16 drochner Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.17 2003/07/15 01:26:30 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.18 2004/08/30 15:05:16 drochner Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -59,11 +59,6 @@ CFATTACH_DECL(mainbus, sizeof(struct device),
int mainbus_print (void *, const char *);
-union mainbus_attach_args {
- const char *mba_busname; /* first elem of all */
- struct pcibus_attach_args mba_pba;
-};
-
/*
* Probe for the mainbus; always succeeds.
*/
@@ -79,7 +74,7 @@ mainbus_match(struct device *parent, struct cfdata *match, void *aux)
void
mainbus_attach(struct device *parent, struct device *self, void *aux)
{
- union mainbus_attach_args mba;
+ struct pcibus_attach_args pba;
#if defined(PCI_NETBSD_CONFIGURE)
struct extent *ioext, *memext;
#endif
@@ -89,8 +84,7 @@ mainbus_attach(struct device *parent, struct device *self, void *aux)
/*
* Always find the CPU
*/
- mba.mba_busname = "cpu";
- config_found(self, &mba, mainbus_print);
+ config_found_ia(self, "mainbus", NULL, mainbus_print);
/*
* XXX Note also that the presence of a PCI bus should
@@ -108,15 +102,14 @@ mainbus_attach(struct device *parent, struct device *self, void *aux)
extent_destroy(ioext);
extent_destroy(memext);
#endif
- mba.mba_pba.pba_busname = "pci";
- mba.mba_pba.pba_iot = &bebox_io_bs_tag;
- mba.mba_pba.pba_memt = &bebox_mem_bs_tag;
- mba.mba_pba.pba_dmat = &pci_bus_dma_tag;
- mba.mba_pba.pba_dmat64 = NULL;
- mba.mba_pba.pba_bus = 0;
- mba.mba_pba.pba_bridgetag = NULL;
- mba.mba_pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED;
- config_found(self, &mba.mba_pba, mainbus_print);
+ pba.pba_iot = &bebox_io_bs_tag;
+ pba.pba_memt = &bebox_mem_bs_tag;
+ pba.pba_dmat = &pci_bus_dma_tag;
+ pba.pba_dmat64 = NULL;
+ pba.pba_bus = 0;
+ pba.pba_bridgetag = NULL;
+ pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED;
+ config_found_ia(self, "pcibus", &pba, pcibusprint);
#endif
}
@@ -131,10 +124,6 @@ extern struct cfdriver cpu_cd;
int
cpu_match(struct device *parent, struct cfdata *cf, void *aux)
{
- union mainbus_attach_args *mba = aux;
-
- if (strcmp(mba->mba_busname, cpu_cd.cd_name) != 0)
- return 0;
if (cpu_info[0].ci_dev != NULL)
return 0;
@@ -151,11 +140,8 @@ cpu_attach(struct device *parent, struct device *self, void *aux)
int
mainbus_print(void *aux, const char *pnp)
{
- union mainbus_attach_args *mba = aux;
if (pnp)
- aprint_normal("%s at %s", mba->mba_busname, pnp);
- if (!strcmp(mba->mba_busname, "pci"))
- aprint_normal(" bus %d", mba->mba_pba.pba_bus);
+ aprint_normal("cpu at %s", pnp);
return (UNCONF);
}
diff --git a/sys/arch/bebox/conf/files.bebox b/sys/arch/bebox/conf/files.bebox
index cf5279b42ad..aaeaf44b075 100644
--- a/sys/arch/bebox/conf/files.bebox
+++ b/sys/arch/bebox/conf/files.bebox
@@ -1,4 +1,4 @@
-# $NetBSD: files.bebox,v 1.44 2004/07/08 22:07:47 drochner Exp $
+# $NetBSD: files.bebox,v 1.45 2004/08/30 15:05:16 drochner Exp $
#
# First try for bebox specific configuration info
#
@@ -46,7 +46,7 @@ include "dev/i2o/files.i2o"
# System bus types
#
define mainbus { }
-device mainbus: isabus, pcibus, mainbus
+device mainbus: pcibus, mainbus
attach mainbus at root
device cpu
diff --git a/sys/arch/bebox/pci/pcib.c b/sys/arch/bebox/pci/pcib.c
index 93bd063719a..30c6f4848be 100644
--- a/sys/arch/bebox/pci/pcib.c
+++ b/sys/arch/bebox/pci/pcib.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pcib.c,v 1.16 2004/04/23 21:13:05 itojun Exp $ */
+/* $NetBSD: pcib.c,v 1.17 2004/08/30 15:05:16 drochner Exp $ */
/*-
* Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.16 2004/04/23 21:13:05 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.17 2004/08/30 15:05:16 drochner Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -67,7 +67,6 @@ CFATTACH_DECL(pcib, sizeof(struct pcib_softc),
pcibmatch, pcibattach, NULL, NULL);
void pcib_callback __P((struct device *));
-int pcib_print __P((void *, const char *));
int
pcibmatch(parent, match, aux)
@@ -119,7 +118,6 @@ pcib_callback(self)
* Attach the ISA bus behind this bridge.
*/
memset(&iba, 0, sizeof(iba));
- iba.iba_busname = "isa";
iba.iba_ic = &sc->sc_chipset;
iba.iba_iot = &bebox_isa_io_bs_tag;
iba.iba_memt = &bebox_isa_mem_bs_tag;
@@ -137,17 +135,5 @@ pcib_callback(self)
panic("pcib_callback: can't map DMA high page registers");
#endif
#endif
- config_found(&sc->sc_dev, &iba, pcib_print);
-}
-
-int
-pcib_print(aux, pnp)
- void *aux;
- const char *pnp;
-{
-
- /* Only ISAs can attach to pcib's; easy. */
- if (pnp)
- aprint_normal("isa at %s", pnp);
- return (UNCONF);
+ config_found_ia(&sc->sc_dev, "isabus", &iba, isabusprint);
}
diff --git a/sys/arch/cats/pci/pcib.c b/sys/arch/cats/pci/pcib.c
index b3d8d56708d..2f807cc72f6 100644
--- a/sys/arch/cats/pci/pcib.c
+++ b/sys/arch/cats/pci/pcib.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pcib.c,v 1.6 2004/04/23 21:13:05 itojun Exp $ */
+/* $NetBSD: pcib.c,v 1.7 2004/08/30 15:05:16 drochner Exp $ */
/*-
* Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.6 2004/04/23 21:13:05 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.7 2004/08/30 15:05:16 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -63,7 +63,6 @@ CFATTACH_DECL(pcib, sizeof(struct device),
pcibmatch, pcibattach, NULL, NULL);
void pcib_callback __P((struct device *));
-int pcib_print __P((void *, const char *));
int
pcibmatch(parent, match, aux)
@@ -120,23 +119,10 @@ pcib_callback(self)
* Attach the ISA bus behind this bridge.
*/
memset(&iba, 0, sizeof(iba));
- iba.iba_busname = "isa";
iba.iba_iot = &isa_io_bs_tag;
iba.iba_memt = &isa_mem_bs_tag;
#if NISADMA > 0
iba.iba_dmat = &isa_bus_dma_tag;
#endif
- config_found(self, &iba, pcib_print);
-}
-
-int
-pcib_print(aux, pnp)
- void *aux;
- const char *pnp;
-{
-
- /* Only ISAs can attach to pcib's; easy. */
- if (pnp)
- aprint_normal("isa at %s", pnp);
- return (UNCONF);
+ config_found_ia(self, "isabus", &iba, isabusprint);
}
diff --git a/sys/arch/cobalt/dev/gt.c b/sys/arch/cobalt/dev/gt.c
index ebea0a5951b..e4c86e4405b 100644
--- a/sys/arch/cobalt/dev/gt.c
+++ b/sys/arch/cobalt/dev/gt.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gt.c,v 1.11 2004/08/28 13:33:31 tsutsui Exp $ */
+/* $NetBSD: gt.c,v 1.12 2004/08/30 15:05:16 drochner Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang. All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.11 2004/08/28 13:33:31 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.12 2004/08/30 15:05:16 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -117,7 +117,6 @@ gt_attach(parent, self, aux)
pc->pc_bst = sc->sc_bst;
pc->pc_bsh = sc->sc_bsh;
- pba.pba_busname = "pci";
pba.pba_dmat = &pci_bus_dma_tag;
pba.pba_dmat64 = NULL;
pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED;
@@ -126,7 +125,7 @@ gt_attach(parent, self, aux)
pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED |
PCI_FLAGS_MRL_OKAY | /*PCI_FLAGS_MRM_OKAY|*/ PCI_FLAGS_MWI_OKAY;
pba.pba_pc = pc;
- config_found(self, &pba, gt_print);
+ config_found_ia(self, "pcibus", &pba, gt_print);
#endif
}
diff --git a/sys/arch/dreamcast/dev/g2/gapspci.c b/sys/arch/dreamcast/dev/g2/gapspci.c
index 81961b0a5cb..25dd4fdf8a8 100644
--- a/sys/arch/dreamcast/dev/g2/gapspci.c
+++ b/sys/arch/dreamcast/dev/g2/gapspci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gapspci.c,v 1.11 2003/07/15 01:31:38 lukem Exp $ */
+/* $NetBSD: gapspci.c,v 1.12 2004/08/30 15:05:16 drochner Exp $ */
/*-
* Copyright (c) 2001 Marcus Comstedt
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: gapspci.c,v 1.11 2003/07/15 01:31:38 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gapspci.c,v 1.12 2004/08/30 15:05:16 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -57,8 +57,6 @@ __KERNEL_RCSID(0, "$NetBSD: gapspci.c,v 1.11 2003/07/15 01:31:38 lukem Exp $");
int gaps_match(struct device *, struct cfdata *, void *);
void gaps_attach(struct device *, struct device *, void *);
-int gaps_print(void *, const char *);
-
CFATTACH_DECL(gapspci, sizeof(struct gaps_softc),
gaps_match, gaps_attach, NULL, NULL);
@@ -123,7 +121,6 @@ gaps_attach(struct device *parent, struct device *self, void *aux)
memset(&pba, 0, sizeof(pba));
- pba.pba_busname = "pci";
pba.pba_memt = sc->sc_memt;
pba.pba_dmat = &sc->sc_dmat;
pba.pba_dmat64 = NULL;
@@ -132,17 +129,5 @@ gaps_attach(struct device *parent, struct device *self, void *aux)
pba.pba_flags = PCI_FLAGS_MEM_ENABLED;
pba.pba_pc = &sc->sc_pc;
- (void) config_found(self, &pba, gaps_print);
-}
-
-int
-gaps_print(void *aux, const char *pnp)
-{
- struct pcibus_attach_args *pba = aux;
-
- if (pnp)
- aprint_normal("%s at %s", pba->pba_busname, pnp);
- aprint_normal(" bus %d", pba->pba_bus);
-
- return (UNCONF);
+ (void) config_found_ia(self, "pcibus", &pba, pcibusprint);
}
diff --git a/sys/arch/evbarm/ifpga/ifpga.c b/sys/arch/evbarm/ifpga/ifpga.c
index 60e41636f88..a7df4e6df77 100644
--- a/sys/arch/evbarm/ifpga/ifpga.c
+++ b/sys/arch/evbarm/ifpga/ifpga.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ifpga.c,v 1.18 2004/04/24 15:49:00 kleink Exp $ */
+/* $NetBSD: ifpga.c,v 1.19 2004/08/30 15:05:17 drochner Exp $ */
/*
* Copyright (c) 2001 ARM Ltd
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ifpga.c,v 1.18 2004/04/24 15:49:00 kleink Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ifpga.c,v 1.19 2004/08/30 15:05:17 drochner Exp $");
#include <sys/types.h>
#include <sys/device.h>
@@ -70,7 +70,6 @@ __KERNEL_RCSID(0, "$NetBSD: ifpga.c,v 1.18 2004/04/24 15:49:00 kleink Exp $");
static int ifpga_match (struct device *, struct cfdata *, void *);
static void ifpga_attach (struct device *, struct device *, void *);
static int ifpga_print (void *, const char *);
-static int ifpga_pci_print (void *, const char *);
/* Drive and attach structures */
CFATTACH_DECL(ifpga, sizeof(struct ifpga_softc),
@@ -110,30 +109,15 @@ ifpga_print(void *aux, const char *pnp)
return UNCONF;
}
-#if NPCI > 0
-static int
-ifpga_pci_print(void *aux, const char *pnp)
-{
- struct pcibus_attach_args *pci_pba = (struct pcibus_attach_args *)aux;
-
- if (pnp)
- aprint_normal("%s at %s", pci_pba->pba_busname, pnp);
- if (strcmp(pci_pba->pba_busname, "pci") == 0)
- aprint_normal(" bus %d", pci_pba->pba_bus);
-
- return UNCONF;
-}
-#endif
-
static int
-ifpga_search(struct device *parent, struct cfdata *cf, void *aux)
+ifpga_search(struct device *parent, struct cfdata *cf,
+ const locdesc_t *ldesc, void *aux)
{
struct ifpga_softc *sc = (struct ifpga_softc *)parent;
struct ifpga_attach_args ifa;
int tryagain;
do {
- ifa.ifa_name = "ifpga_periph";
ifa.ifa_iot = sc->sc_iot;
ifa.ifa_addr = cf->cf_iobase;
ifa.ifa_irq = cf->cf_irq;
@@ -328,12 +312,11 @@ ifpga_attach(struct device *parent, struct device *self, void *aux)
#endif /* NPCI > 0 */
/* Finally, search for children. */
- config_search(ifpga_search, self, NULL);
+ config_search_ia(ifpga_search, self, "ifpga", NULL);
#if NPCI > 0
integrator_pci_dma_init(&ifpga_pci_bus_dma_tag);
- pci_pba.pba_busname = "pci";
pci_pba.pba_pc = &ifpga_pci_chipset;
pci_pba.pba_iot = &ifpga_pci_io_tag;
pci_pba.pba_memt = &ifpga_pci_mem_tag;
@@ -343,7 +326,7 @@ ifpga_attach(struct device *parent, struct device *self, void *aux)
pci_pba.pba_bus = 0;
pci_pba.pba_bridgetag = NULL;
- config_found(self, &pci_pba, ifpga_pci_print);
+ config_found_ia(self, "pcibus", &pci_pba, pcibusprint);
#endif
}
diff --git a/sys/arch/evbmips/malta/dev/gt.c b/sys/arch/evbmips/malta/dev/gt.c
index b3f56582837..b9361cfe51e 100644
--- a/sys/arch/evbmips/malta/dev/gt.c
+++ b/sys/arch/evbmips/malta/dev/gt.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gt.c,v 1.7 2003/07/15 01:37:34 lukem Exp $ */
+/* $NetBSD: gt.c,v 1.8 2004/08/30 15:05:17 drochner Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.7 2003/07/15 01:37:34 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.8 2004/08/30 15:05:17 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -115,7 +115,6 @@ gt_attach(parent, self, aux)
printf("\n");
#if NPCI > 0
- pba.pba_busname = "pci";
pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED;
pba.pba_bus = 0;
pba.pba_bridgetag = NULL;
@@ -125,7 +124,7 @@ gt_attach(parent, self, aux)
pba.pba_dmat64 = NULL;
pba.pba_pc = &mcp->mc_pc;
- config_found(self, &pba, gt_print);
+ config_found_ia(self, "pcibus", &pba, gt_print);
#endif
return;
}
diff --git a/sys/arch/evbmips/malta/pci/pcib.c b/sys/arch/evbmips/malta/pci/pcib.c
index 379c7425295..52cf185f58e 100644
--- a/sys/arch/evbmips/malta/pci/pcib.c
+++ b/sys/arch/evbmips/malta/pci/pcib.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pcib.c,v 1.9 2004/04/24 15:49:00 kleink Exp $ */
+/* $NetBSD: pcib.c,v 1.10 2004/08/30 15:05:17 drochner Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.9 2004/04/24 15:49:00 kleink Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.10 2004/08/30 15:05:17 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -120,7 +120,6 @@ static int pcib_match(struct device *, struct cfdata *, void *);
static void pcib_attach(struct device *, struct device *, void *);
static int pcib_intr(void *v);
static void pcib_bridge_callback(struct device *);
-static int pcib_print(void *, const char *);
static void pcib_set_icus(struct pcib_softc *sc);
static void pcib_cleanup(void *arg);
@@ -319,7 +318,6 @@ pcib_bridge_callback(struct device *self)
*/
memset(&iba, 0, sizeof(iba));
- iba.iba_busname = "isa";
iba.iba_iot = &mcp->mc_iot;
iba.iba_memt = &mcp->mc_memt;
iba.iba_dmat = &mcp->mc_isa_dmat;
@@ -327,17 +325,7 @@ pcib_bridge_callback(struct device *self)
iba.iba_ic = &sc->sc_ic;
iba.iba_ic->ic_attach_hook = pcib_isa_attach_hook;
- config_found(&sc->sc_dev, &iba, pcib_print);
-}
-
-static int
-pcib_print(void *aux, const char *pnp)
-{
-
- /* Only ISAs can attach to pcib's; easy. */
- if (pnp)
- aprint_normal("isa at %s", pnp);
- return (UNCONF);
+ config_found_ia(&sc->sc_dev, "isabus", &iba, isabusprint);
}
static void
diff --git a/sys/arch/evbppc/walnut/pci/pchb.c b/sys/arch/evbppc/walnut/pci/pchb.c
index 5dfc10eaba2..b9c755337aa 100644
--- a/sys/arch/evbppc/walnut/pci/pchb.c
+++ b/sys/arch/evbppc/walnut/pci/pchb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pchb.c,v 1.5 2004/04/24 15:49:00 kleink Exp $ */
+/* $NetBSD: pchb.c,v 1.6 2004/08/30 15:05:17 drochner Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pchb.c,v 1.5 2004/04/24 15:49:00 kleink Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pchb.c,v 1.6 2004/08/30 15:05:17 drochner Exp $");
#include "pci.h"
#include "opt_pci.h"
@@ -182,7 +182,6 @@ pchbattach(struct device *parent, struct device *self, void *aux)
#ifdef PCI_CONFIGURE_VERBOSE
printf("running config_found PCI\n");
#endif
- pba.pba_busname = "pci";
/* IO window located @ e8000000 and maps to 0-0xffff */
pba.pba_iot = &pchb_io_tag;
/* PCI memory window is directly mapped */
@@ -192,7 +191,7 @@ pchbattach(struct device *parent, struct device *self, void *aux)
pba.pba_bus = 0;
pba.pba_bridgetag = NULL;
pba.pba_flags = PCI_FLAGS_MEM_ENABLED | PCI_FLAGS_IO_ENABLED;
- config_found(self, &pba, pchbprint);
+ config_found_ia(self, "pcibus", &pba, pchbprint);
}
diff --git a/sys/arch/evbsh5/dev/superio.c b/sys/arch/evbsh5/dev/superio.c
index fdcc4ec462b..15a6434f73d 100644
--- a/sys/arch/evbsh5/dev/superio.c
+++ b/sys/arch/evbsh5/dev/superio.c
@@ -1,4 +1,4 @@
-/* $NetBSD: superio.c,v 1.14 2003/07/15 01:37:39 lukem Exp $ */
+/* $NetBSD: superio.c,v 1.15 2004/08/30 15:05:17 drochner Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: superio.c,v 1.14 2003/07/15 01:37:39 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: superio.c,v 1.15 2004/08/30 15:05:17 drochner Exp $");
#include "locators.h"
#include "com.h"
@@ -77,7 +77,6 @@ struct superio_softc {
static int superiomatch(struct device *, struct cfdata *, void *);
static void superioattach(struct device *, struct device *, void *);
-static int superioprint(void *, const char *);
CFATTACH_DECL(superio, sizeof(struct superio_softc),
superiomatch, superioattach, NULL, NULL);
@@ -271,23 +270,11 @@ superioattach(struct device *parent, struct device *self, void *args)
/*
* Attach the isa bus
*/
- iba.iba_busname = "isa";
iba.iba_iot = &superio_bus_space_tag;
iba.iba_memt = NULL;
iba.iba_dmat = NULL;/* XXX Should be able to do DMA thru dmac */
iba.iba_ic = (void *)sc;
- config_found(self, &iba, superioprint);
-}
-
-static int
-superioprint(void *arg, const char *cp)
-{
- struct superio_attach_args *saa = arg;
-
- if (cp)
- aprint_normal("%s at %s", saa->saa_name, cp);
-
- return (UNCONF);
+ config_found_ia(self, "isabus", &iba, isabusprint);
}
static void
diff --git a/sys/arch/hp700/dev/dino.c b/sys/arch/hp700/dev/dino.c
index 05864493e17..27728dc3fe8 100644
--- a/sys/arch/hp700/dev/dino.c
+++ b/sys/arch/hp700/dev/dino.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dino.c,v 1.2 2004/08/26 16:52:27 jkunz Exp $ */
+/* $NetBSD: dino.c,v 1.3 2004/08/30 15:05:17 drochner Exp $ */
/* $OpenBSD: dino.c,v 1.5 2004/02/13 20:39:31 mickey Exp $ */
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dino.c,v 1.2 2004/08/26 16:52:27 jkunz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dino.c,v 1.3 2004/08/30 15:05:17 drochner Exp $");
/* #include "cardbus.h" */
@@ -249,7 +249,6 @@ void dino_dmamem_free(void *, bus_dma_segment_t *, int);
int dino_dmamem_map(void *, bus_dma_segment_t *, int, size_t, caddr_t *, int);
void dino_dmamem_unmap(void *, caddr_t, size_t);
paddr_t dino_dmamem_mmap(void *, bus_dma_segment_t *, int, off_t, int, int);
-int dinoprint(void *, const char *);
void
@@ -1557,16 +1556,6 @@ const struct hppa_pci_chipset_tag dino_pc = {
};
int
-dinoprint(void *aux, const char *pnp)
-{
- struct pcibus_attach_args *pba = aux;
-
- if (pnp)
- printf("%s at %s\n", pba->pba_busname, pnp);
- return UNCONF;
-}
-
-int
dinomatch(parent, cfdata, aux)
struct device *parent;
struct cfdata *cfdata;
@@ -1705,7 +1694,6 @@ dinoattach(parent, self, aux)
pdc_scanbus(self, ca, MAXMODBUS);
#endif
- pba.pba_busname = "pci";
pba.pba_iot = &sc->sc_iot;
pba.pba_memt = &sc->sc_memt;
pba.pba_dmat = &sc->sc_dmatag;
@@ -1713,5 +1701,5 @@ dinoattach(parent, self, aux)
pba.pba_bus = 0;
pba.pba_bridgetag = NULL;
pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED;
- config_found(self, &pba, dinoprint);
+ config_found_ia(self, "pcibus", &pba, pcibusprint);
}
diff --git a/sys/arch/hp700/dev/mongoose.c b/sys/arch/hp700/dev/mongoose.c
index 0ef6bcf0445..39b78a4f5b9 100644
--- a/sys/arch/hp700/dev/mongoose.c
+++ b/sys/arch/hp700/dev/mongoose.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mongoose.c,v 1.8 2003/11/28 19:03:03 chs Exp $ */
+/* $NetBSD: mongoose.c,v 1.9 2004/08/30 15:05:17 drochner Exp $ */
/* $OpenBSD: mongoose.c,v 1.7 2000/08/15 19:42:56 mickey Exp $ */
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mongoose.c,v 1.8 2003/11/28 19:03:03 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mongoose.c,v 1.9 2004/08/30 15:05:17 drochner Exp $");
#define MONGOOSE_DEBUG 9
@@ -205,7 +205,6 @@ struct mongoose_softc {
};
union mongoose_attach_args {
- char *mongoose_name;
struct eisabus_attach_args mongoose_eisa;
struct isabus_attach_args mongoose_isa;
};
@@ -241,7 +240,6 @@ void mg_isa_sr_4(void *, bus_space_handle_t, bus_size_t, u_int32_t, bus_size_t);
int mgmatch(struct device *, struct cfdata *, void *);
void mgattach(struct device *, struct device *, void *);
-int mgprint(void *, const char *);
CFATTACH_DECL(mongoose, sizeof(struct mongoose_softc),
mgmatch, mgattach, NULL, NULL);
@@ -659,12 +657,11 @@ mgattach(struct device *parent, struct device *self, void *aux)
bt->hbt_unmap = mg_eisa_memunmap;
/* attachment guts */
- ea.mongoose_eisa.eba_busname = "eisa";
ea.mongoose_eisa.eba_iot = &sc->sc_eiot;
ea.mongoose_eisa.eba_memt = &sc->sc_ememt;
ea.mongoose_eisa.eba_dmat = NULL /* &sc->sc_edmat */;
ea.mongoose_eisa.eba_ec = &sc->sc_ec;
- config_found(self, &ea.mongoose_eisa, mgprint);
+ config_found_ia(self, "eisabus", &ea.mongoose_eisa, eisabusprint);
sc->sc_ic.ic_v = sc;
sc->sc_ic.ic_attach_hook = mg_isa_attach_hook;
@@ -681,14 +678,13 @@ mgattach(struct device *parent, struct device *self, void *aux)
/* TODO: DMA tags */
/* attachment guts */
- ea.mongoose_isa.iba_busname = "isa";
ea.mongoose_isa.iba_iot = &sc->sc_iiot;
ea.mongoose_isa.iba_memt = &sc->sc_imemt;
#if NISADMA > 0
ea.mongoose_isa.iba_dmat = &sc->sc_idmat;
#endif
ea.mongoose_isa.iba_ic = &sc->sc_ic;
- config_found(self, &ea.mongoose_isa, mgprint);
+ config_found_ia(self, "isabus", &ea.mongoose_isa, isabusprint);
#undef R
/* attach interrupt */
@@ -696,15 +692,3 @@ mgattach(struct device *parent, struct device *self, void *aux)
mg_intr, sc,
&int_reg_cpu, ca->ca_irq);
}
-
-int
-mgprint(void *aux, const char *pnp)
-{
- union mongoose_attach_args *ea = aux;
-
- if (pnp)
- aprint_normal ("%s at %s", ea->mongoose_name, pnp);
-
- return (UNCONF);
-}
-
diff --git a/sys/arch/hpcmips/isa/isa_machdep.c b/sys/arch/hpcmips/isa/isa_machdep.c
index 7156c4ac722..548874f6aa2 100644
--- a/sys/arch/hpcmips/isa/isa_machdep.c
+++ b/sys/arch/hpcmips/isa/isa_machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: isa_machdep.c,v 1.28 2003/07/15 02:29:32 lukem Exp $ */
+/* $NetBSD: isa_machdep.c,v 1.29 2004/08/30 15:05:17 drochner Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.28 2003/07/15 02:29:32 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.29 2004/08/30 15:05:17 drochner Exp $");
#include "opt_vr41xx.h"
@@ -151,7 +151,6 @@ vrisabattach(struct device *parent, struct device *self, void *aux)
sc->sc_hc = (*haa->haa_getchip)(haa->haa_sc, VRIP_IOCHIP_VRGIU);
sc->sc_isa_ic.ic_sc = sc;
- iba.iba_busname = "isa";
iba.iba_ic = &sc->sc_isa_ic;
iba.iba_dmat = 0; /* XXX not yet */
@@ -181,7 +180,7 @@ vrisabattach(struct device *parent, struct device *self, void *aux)
printf(": ISA port %#x-%#x mem %#x-%#x\n",
iot->base, iot->base + iot->size,
memt->base, memt->base + memt->size);
- config_found(self, &iba, vrisabprint);
+ config_found_ia(self, "isabus", &iba, vrisabprint);
#endif
#ifdef DEBUG_FIND_COMPORT
diff --git a/sys/arch/hpcmips/isa/plumisa_machdep.c b/sys/arch/hpcmips/isa/plumisa_machdep.c
index 55b0f1504b4..97de8461270 100644
--- a/sys/arch/hpcmips/isa/plumisa_machdep.c
+++ b/sys/arch/hpcmips/isa/plumisa_machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: plumisa_machdep.c,v 1.6 2003/07/15 02:29:32 lukem Exp $ */
+/* $NetBSD: plumisa_machdep.c,v 1.7 2004/08/30 15:05:17 drochner Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: plumisa_machdep.c,v 1.6 2003/07/15 02:29:32 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: plumisa_machdep.c,v 1.7 2004/08/30 15:05:17 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -125,12 +125,11 @@ plumisabattach(struct device *parent, struct device *self, void *aux)
bus_space_unmap(sc->sc_iot, ioh, 0x400);
}
- iba.iba_busname = "isa";
iba.iba_ic = sc;
/* Plum ISA-bus don't have memory space! */
/* Plum ISA port space */
iba.iba_iot = sc->sc_iot;
- config_found(self, &iba, plumisabprint);
+ config_found_ia(self, "isabus", &iba, plumisabprint);
}
int
diff --git a/sys/arch/hpcmips/vr/vrc4172pci.c b/sys/arch/hpcmips/vr/vrc4172pci.c
index 6e7150cbf11..501ace2f863 100644
--- a/sys/arch/hpcmips/vr/vrc4172pci.c
+++ b/sys/arch/hpcmips/vr/vrc4172pci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vrc4172pci.c,v 1.11 2003/12/27 07:34:21 shin Exp $ */
+/* $NetBSD: vrc4172pci.c,v 1.12 2004/08/30 15:05:17 drochner Exp $ */
/*-
* Copyright (c) 2002 TAKEMURA Shin
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vrc4172pci.c,v 1.11 2003/12/27 07:34:21 shin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vrc4172pci.c,v 1.12 2004/08/30 15:05:17 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -78,9 +78,6 @@ struct vrc4172pci_softc {
static int vrc4172pci_match(struct device *, struct cfdata *, void *);
static void vrc4172pci_attach(struct device *, struct device *, void *);
-#if NPCI > 0
-static int vrc4172pci_print(void *, const char *);
-#endif
static void vrc4172pci_attach_hook(struct device *, struct device *,
struct pcibus_attach_args *);
static int vrc4172pci_bus_maxdevs(pci_chipset_tag_t, int);
@@ -197,7 +194,6 @@ vrc4172pci_attach(struct device *parent, struct device *self, void *aux)
#if NPCI > 0
memset(&pba, 0, sizeof(pba));
- pba.pba_busname = "pci";
pba.pba_iot = sc->sc_iot;
pba.pba_memt = sc->sc_iot;
pba.pba_dmat = &hpcmips_default_bus_dma_tag.bdt;
@@ -208,25 +204,10 @@ vrc4172pci_attach(struct device *parent, struct device *self, void *aux)
PCI_FLAGS_MRL_OKAY;
pba.pba_pc = pc;
- config_found(self, &pba, vrc4172pci_print);
+ config_found_ia(self, "pcibus", &pba, pcibusprint);
#endif
}
-#if NPCI > 0
-static int
-vrc4172pci_print(void *aux, const char *pnp)
-{
- struct pcibus_attach_args *pba = aux;
-
- if (pnp != NULL)
- aprint_normal("%s at %s", pba->pba_busname, pnp);
- else
- aprint_normal(" bus %d", pba->pba_bus);
-
- return (UNCONF);
-}
-#endif
-
void
vrc4172pci_attach_hook(struct device *parent, struct device *self,
struct pcibus_attach_args *pba)
diff --git a/sys/arch/hpcmips/vr/vrpciu.c b/sys/arch/hpcmips/vr/vrpciu.c
index 51347ebb0ef..ff58e7d23e3 100644
--- a/sys/arch/hpcmips/vr/vrpciu.c
+++ b/sys/arch/hpcmips/vr/vrpciu.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vrpciu.c,v 1.14 2003/07/15 02:29:36 lukem Exp $ */
+/* $NetBSD: vrpciu.c,v 1.15 2004/08/30 15:05:17 drochner Exp $ */
/*-
* Copyright (c) 2001 Enami Tsugutomo.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vrpciu.c,v 1.14 2003/07/15 02:29:36 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vrpciu.c,v 1.15 2004/08/30 15:05:17 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -80,9 +80,6 @@ static u_int16_t
#endif
static int vrpciu_match(struct device *, struct cfdata *, void *);
static void vrpciu_attach(struct device *, struct device *, void *);
-#if NPCI > 0
-static int vrpciu_print(void *, const char *);
-#endif
static int vrpciu_intr(void *);
static void vrpciu_attach_hook(struct device *, struct device *,
struct pcibus_attach_args *);
@@ -281,7 +278,6 @@ vrpciu_attach(struct device *parent, struct device *self, void *aux)
#if NPCI > 0
memset(&pba, 0, sizeof(pba));
- pba.pba_busname = "pci";
/* For now, just inherit window mappings set by WinCE. XXX. */
@@ -326,25 +322,10 @@ vrpciu_attach(struct device *parent, struct device *self, void *aux)
PCI_FLAGS_MRL_OKAY;
pba.pba_pc = pc;
- config_found(self, &pba, vrpciu_print);
+ config_found_ia(self, "pcibus", &pba, pcibusprint);
#endif
}
-#if NPCI > 0
-static int
-vrpciu_print(void *aux, const char *pnp)
-{
- struct pcibus_attach_args *pba = aux;
-
- if (pnp != NULL)
- aprint_normal("%s at %s", pba->pba_busname, pnp);
- else
- aprint_normal(" bus %d", pba->pba_bus);
-
- return (UNCONF);
-}
-#endif
-
/*
* Handle PCI error interrupts.
*/
diff --git a/sys/arch/i386/bios/vesabios.c b/sys/arch/i386/bios/vesabios.c
index 3df563e90fc..1bd2d335fdd 100644
--- a/sys/arch/i386/bios/vesabios.c
+++ b/sys/arch/i386/bios/vesabios.c
@@ -1,7 +1,7 @@
-/* $NetBSD: vesabios.c,v 1.10 2003/07/14 22:13:09 lukem Exp $ */
+/* $NetBSD: vesabios.c,v 1.11 2004/08/30 15:05:17 drochner Exp $ */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vesabios.c,v 1.10 2003/07/14 22:13:09 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vesabios.c,v 1.11 2004/08/30 15:05:17 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -49,11 +49,6 @@ vesabios_match(parent, match, aux)
struct cfdata *match;
void *aux;
{
- struct vesabios_attach_args *vaa = aux;
-
- /* These are not the droids you're looking for. */
- if (strcmp(vaa->vaa_busname, "vesabios") != 0)
- return (0);
return (1);
}
diff --git a/sys/arch/i386/conf/files.i386 b/sys/arch/i386/conf/files.i386
index 7a0de1fe187..72e6b7658ed 100644
--- a/sys/arch/i386/conf/files.i386
+++ b/sys/arch/i386/conf/files.i386
@@ -1,4 +1,4 @@
-# $NetBSD: files.i386,v 1.259 2004/07/10 18:51:01 cube Exp $
+# $NetBSD: files.i386,v 1.260 2004/08/30 15:05:17 drochner Exp $
#
# new style config file for i386 architecture
#
@@ -132,12 +132,18 @@ file arch/i386/i386/bioscall.S bioscall needs-flag
define bios32
file arch/i386/i386/bios32.c bios32 needs-flag
+# i386 specific mainbus attributes
+define apmbus {}
+define pnpbiosbus {}
+define vesabiosbus {}
+
#
# System bus types
#
# XXX BIOS32 only if something that uses it is configured!
-device mainbus: isabus, eisabus, mcabus, pcibus, mainbus, bios32, acpibus
+device mainbus: isabus, eisabus, mcabus, pcibus, bios32, acpibus,
+ cpubus, apmbus, pnpbiosbus, vesabiosbus
attach mainbus at root
file arch/i386/i386/mainbus.c mainbus
@@ -297,7 +303,7 @@ include "dev/gpib/files.gpib"
# Advanced Power Management support (APM)
device apm: bioscall
-attach apm at mainbus
+attach apm at apmbus
file arch/i386/i386/apm.c apm needs-count
file arch/i386/i386/apmcall.S apm
@@ -305,7 +311,7 @@ file arch/i386/i386/apmcall.S apm
define cpu { [apid = -1] }
device cpu
-attach cpu at mainbus
+attach cpu at cpubus
file arch/i386/i386/cpu.c cpu
#
@@ -456,7 +462,7 @@ attach npx at acpi with npx_acpi
file arch/i386/acpi/npx_acpi.c npx_acpi
device vesabios {}
-attach vesabios at mainbus
+attach vesabios at vesabiosbus
file arch/i386/bios/vesabios.c vesabios needs-flag
defflag opt_vesabios.h VESABIOSVERBOSE
diff --git a/sys/arch/i386/i386/apm.c b/sys/arch/i386/i386/apm.c
index 12e57b42718..4d434a67526 100644
--- a/sys/arch/i386/i386/apm.c
+++ b/sys/arch/i386/i386/apm.c
@@ -1,4 +1,4 @@
-/* $NetBSD: apm.c,v 1.83 2004/07/03 22:29:13 mycroft Exp $ */
+/* $NetBSD: apm.c,v 1.84 2004/08/30 15:05:17 drochner Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: apm.c,v 1.83 2004/07/03 22:29:13 mycroft Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apm.c,v 1.84 2004/08/30 15:05:17 drochner Exp $");
#include "apm.h"
#if NAPM > 1
@@ -1090,12 +1090,6 @@ apmmatch(parent, match, aux)
struct cfdata *match;
void *aux;
{
- struct apm_attach_args *aaa = aux;
-
- /* These are not the droids you're looking for. */
- if (strcmp(aaa->aaa_busname, "apm") != 0)
- return (0);
-
/* There can be only one! */
if (apm_inited)
return 0;
diff --git a/sys/arch/i386/i386/cpu.c b/sys/arch/i386/i386/cpu.c
index c7bfd0d687a..9f9e1d16558 100644
--- a/sys/arch/i386/i386/cpu.c
+++ b/sys/arch/i386/i386/cpu.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.19 2004/04/30 02:05:43 lukem Exp $ */
+/* $NetBSD: cpu.c,v 1.20 2004/08/30 15:05:17 drochner Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.19 2004/04/30 02:05:43 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.20 2004/08/30 15:05:17 drochner Exp $");
#include "opt_ddb.h"
#include "opt_multiprocessor.h"
@@ -194,11 +194,8 @@ cpu_match(parent, match, aux)
struct cfdata *match;
void *aux;
{
- struct cpu_attach_args *caa = aux;
- if (strcmp(caa->caa_name, match->cf_name) == 0)
- return 1;
- return 0;
+ return 1;
}
static void
diff --git a/sys/arch/i386/i386/mainbus.c b/sys/arch/i386/i386/mainbus.c
index f5fcb638629..db6f509943e 100644
--- a/sys/arch/i386/i386/mainbus.c
+++ b/sys/arch/i386/i386/mainbus.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mainbus.c,v 1.53 2003/10/27 14:11:47 junyoung Exp $ */
+/* $NetBSD: mainbus.c,v 1.54 2004/08/30 15:05:17 drochner Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.53 2003/10/27 14:11:47 junyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.54 2004/08/30 15:05:17 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -218,21 +218,21 @@ mainbus_attach(parent, self, aux)
#endif
{
struct cpu_attach_args caa;
-
+
memset(&caa, 0, sizeof(caa));
caa.caa_name = "cpu";
caa.cpu_number = 0;
caa.cpu_role = CPU_ROLE_SP;
caa.cpu_func = 0;
-
- config_found(self, &caa, mainbus_print);
+
+ config_found_ia(self, "cpubus", &caa, mainbus_print);
}
}
#if NVESABIOS > 0
if (vbeprobe()) {
mba.mba_vba.vaa_busname = "vesabios";
- config_found(self, &mba.mba_vba, mainbus_print);
+ config_found_ia(self, "vesabiosbus", &mba.mba_vba, mainbus_print);
}
#endif
@@ -255,7 +255,7 @@ mainbus_attach(parent, self, aux)
PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY |
PCI_FLAGS_MWI_OKAY;
mba.mba_acpi.aa_ic = &x86_isa_chipset;
- config_found(self, &mba.mba_acpi, mainbus_print);
+ config_found_ia(self, "acpibus", &mba.mba_acpi, mainbus_print);
#if 0 /* XXXJRT not yet */
if (acpi_active) {
/*
@@ -275,7 +275,7 @@ mainbus_attach(parent, self, aux)
if (pnpbios_probe()) {
mba.mba_paa.paa_busname = "pnpbios";
mba.mba_paa.paa_ic = &x86_isa_chipset;
- config_found(self, &mba.mba_paa, mainbus_print);
+ config_found_ia(self, "pnpbiosbus", &mba.mba_paa, mainbus_print);
}
#endif
@@ -287,7 +287,6 @@ mainbus_attach(parent, self, aux)
*/
#if NPCI > 0
if (pci_mode != 0) {
- mba.mba_pba.pba_busname = "pci";
mba.mba_pba.pba_iot = X86_BUS_SPACE_IO;
mba.mba_pba.pba_memt = X86_BUS_SPACE_MEM;
mba.mba_pba.pba_dmat = &pci_bus_dma_tag;
@@ -298,45 +297,43 @@ mainbus_attach(parent, self, aux)
mba.mba_pba.pba_bridgetag = NULL;
#if defined(MPACPI) && defined(MPACPI_SCANPCI)
if (mpacpi_active)
- mpacpi_scan_pci(self, &mba.mba_pba, mainbus_print);
+ mpacpi_scan_pci(self, &mba.mba_pba, pcibusprint);
else
#endif
#if defined(MPBIOS) && defined(MPBIOS_SCANPCI)
if (mpbios_scanned != 0)
- mpbios_scan_pci(self, &mba.mba_pba, mainbus_print);
+ mpbios_scan_pci(self, &mba.mba_pba, pcibusprint);
else
#endif
- config_found(self, &mba.mba_pba, mainbus_print);
+ config_found_ia(self, "pcibus", &mba.mba_pba, pcibusprint);
}
#endif
#if NMCA > 0
/* Note: MCA bus probe is done in i386/machdep.c */
if (MCA_system) {
- mba.mba_mba.mba_busname = "mca";
mba.mba_mba.mba_iot = X86_BUS_SPACE_IO;
mba.mba_mba.mba_memt = X86_BUS_SPACE_MEM;
mba.mba_mba.mba_dmat = &mca_bus_dma_tag;
mba.mba_mba.mba_mc = NULL;
mba.mba_mba.mba_bus = 0;
- config_found(self, &mba.mba_mba, mainbus_print);
+ config_found_ia(self, "mcabus", &mba.mba_mba, mcabusprint);
}
#endif
if (memcmp(ISA_HOLE_VADDR(EISA_ID_PADDR), EISA_ID, EISA_ID_LEN) == 0 &&
eisa_has_been_seen == 0) {
- mba.mba_eba.eba_busname = "eisa";
mba.mba_eba.eba_iot = X86_BUS_SPACE_IO;
mba.mba_eba.eba_memt = X86_BUS_SPACE_MEM;
#if NEISA > 0
mba.mba_eba.eba_dmat = &eisa_bus_dma_tag;
#endif
- config_found(self, &mba.mba_eba, mainbus_print);
+ config_found_ia(self, "eisabus", &mba.mba_eba, eisabusprint);
}
#if NISA > 0
if (isa_has_been_seen == 0)
- config_found(self, &mba_iba, mainbus_print);
+ config_found_ia(self, "isabus", &mba_iba, isabusprint);
#endif
#if NAPM > 0
@@ -345,7 +342,7 @@ mainbus_attach(parent, self, aux)
#endif
if (apm_busprobe()) {
mba.mba_aaa.aaa_busname = "apm";
- config_found(self, &mba.mba_aaa, mainbus_print);
+ config_found_ia(self, "apmbus", &mba.mba_aaa, mainbus_print);
}
#endif
}
@@ -359,7 +356,5 @@ mainbus_print(aux, pnp)
if (pnp)
aprint_normal("%s at %s", mba->mba_busname, pnp);
- if (strcmp(mba->mba_busname, "pci") == 0)
- aprint_normal(" bus %d", mba->mba_pba.pba_bus);
return (UNCONF);
}
diff --git a/sys/arch/i386/mca/mca_machdep.c b/sys/arch/i386/mca/mca_machdep.c
index 98db573fcca..5550bbe9fe9 100644
--- a/sys/arch/i386/mca/mca_machdep.c
+++ b/sys/arch/i386/mca/mca_machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mca_machdep.c,v 1.22 2003/12/15 08:38:01 jdolecek Exp $ */
+/* $NetBSD: mca_machdep.c,v 1.23 2004/08/30 15:05:17 drochner Exp $ */
/*-
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mca_machdep.c,v 1.22 2003/12/15 08:38:01 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mca_machdep.c,v 1.23 2004/08/30 15:05:17 drochner Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -169,8 +169,7 @@ mca_attach_hook(parent, self, mba)
if (bus_space_map(dmaiot, DMA_CMD, 1, 0, &dmacmdh)
|| bus_space_map(dmaiot, DMA_EXEC, 1, 0, &dmaexech))
- panic("%s: couldn't map DMA registers",
- mba->mba_busname);
+ panic("mca: couldn't map DMA registers");
}
/*
diff --git a/sys/arch/i386/pci/pceb.c b/sys/arch/i386/pci/pceb.c
index b470a13ddd7..9f2ec8756e5 100644
--- a/sys/arch/i386/pci/pceb.c
+++ b/sys/arch/i386/pci/pceb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pceb.c,v 1.13 2004/04/23 21:13:05 itojun Exp $ */
+/* $NetBSD: pceb.c,v 1.14 2004/08/30 15:05:17 drochner Exp $ */
/*-
* Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pceb.c,v 1.13 2004/04/23 21:13:05 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pceb.c,v 1.14 2004/08/30 15:05:17 drochner Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -64,7 +64,6 @@ CFATTACH_DECL(pceb, sizeof(struct device),
pcebmatch, pcebattach, NULL, NULL);
void pceb_callback __P((struct device *));
-int pceb_print __P((void *, const char *));
union pceb_attach_args {
const char *ea_name; /* XXX should be common */
@@ -135,35 +134,21 @@ pceb_callback(self)
* Attach the EISA bus behind this bridge.
*/
memset(&ea, 0, sizeof(ea));
- ea.ea_eba.eba_busname = "eisa";
ea.ea_eba.eba_iot = X86_BUS_SPACE_IO;
ea.ea_eba.eba_memt = X86_BUS_SPACE_MEM;
#if NEISA > 0
ea.ea_eba.eba_dmat = &eisa_bus_dma_tag;
#endif
- config_found(self, &ea.ea_eba, pceb_print);
+ config_found_ia(self, "eisabus", &ea.ea_eba, eisabusprint);
/*
* Attach the ISA bus behind this bridge.
*/
memset(&ea, 0, sizeof(ea));
- ea.ea_iba.iba_busname = "isa";
ea.ea_iba.iba_iot = X86_BUS_SPACE_IO;
ea.ea_iba.iba_memt = X86_BUS_SPACE_MEM;
#if NISA > 0
ea.ea_iba.iba_dmat = &isa_bus_dma_tag;
#endif
- config_found(self, &ea.ea_iba, pceb_print);
-}
-
-int
-pceb_print(aux, pnp)
- void *aux;
- const char *pnp;
-{
- union pceb_attach_args *ea = aux;
-
- if (pnp)
- aprint_normal("%s at %s", ea->ea_name, pnp);
- return (UNCONF);
+ config_found_ia(self, "isabus", &ea.ea_iba, isabusprint);
}
diff --git a/sys/arch/i386/pci/pchb.c b/sys/arch/i386/pci/pchb.c
index c3021468a12..63eb7e793a5 100644
--- a/sys/arch/i386/pci/pchb.c
+++ b/sys/arch/i386/pci/pchb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pchb.c,v 1.53 2004/07/05 19:15:05 mycroft Exp $ */
+/* $NetBSD: pchb.c,v 1.54 2004/08/30 15:05:17 drochner Exp $ */
/*-
* Copyright (c) 1996, 1998, 2000 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pchb.c,v 1.53 2004/07/05 19:15:05 mycroft Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pchb.c,v 1.54 2004/08/30 15:05:17 drochner Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -81,9 +81,6 @@ __KERNEL_RCSID(0, "$NetBSD: pchb.c,v 1.53 2004/07/05 19:15:05 mycroft Exp $");
int pchbmatch __P((struct device *, struct cfdata *, void *));
void pchbattach __P((struct device *, struct device *, void *));
-int pchb_print __P((void *, const char *));
-int agp_print __P((void *, const char *));
-
CFATTACH_DECL(pchb, sizeof(struct pchb_softc),
pchbmatch, pchbattach, NULL, NULL);
@@ -331,13 +328,11 @@ pchbattach(struct device *parent, struct device *self, void *aux)
if (has_agp ||
pci_get_capability(pa->pa_pc, pa->pa_tag, PCI_CAP_AGP,
NULL, NULL) != 0) {
- apa.apa_busname = "agp";
apa.apa_pci_args = *pa;
- config_found(self, &apa, agp_print);
+ config_found_ia(self, "agpbus", &apa, agpbusprint);
}
if (doattach) {
- pba.pba_busname = "pci";
pba.pba_iot = pa->pa_iot;
pba.pba_memt = pa->pa_memt;
pba.pba_dmat = pa->pa_dmat;
@@ -349,27 +344,6 @@ pchbattach(struct device *parent, struct device *self, void *aux)
pba.pba_pc = pa->pa_pc;
pba.pba_intrswiz = 0;
memset(&pba.pba_intrtag, 0, sizeof(pba.pba_intrtag));
- config_found(self, &pba, pchb_print);
+ config_found_ia(self, "pcibus", &pba, pcibusprint);
}
}
-
-int
-pchb_print(void *aux, const char *pnp)
-{
- struct pcibus_attach_args *pba = aux;
-
- if (pnp != NULL)
- aprint_normal("%s at %s", pba->pba_busname, pnp);
- aprint_normal(" bus %d", pba->pba_bus);
- return (UNCONF);
-}
-
-int
-agp_print(void *aux, const char *pnp)
-{
- struct agpbus_attach_args *apa = aux;
-
- if (pnp != NULL)
- aprint_normal("%s at %s", apa->apa_busname, pnp);
- return (UNCONF);
-}
diff --git a/sys/arch/i386/pci/pcib.c b/sys/arch/i386/pci/pcib.c
index c2e79508a1d..ce6fd658236 100644
--- a/sys/arch/i386/pci/pcib.c
+++ b/sys/arch/i386/pci/pcib.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pcib.c,v 1.33 2004/04/23 21:13:05 itojun Exp $ */
+/* $NetBSD: pcib.c,v 1.34 2004/08/30 15:05:17 drochner Exp $ */
/*-
* Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.33 2004/04/23 21:13:05 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.34 2004/08/30 15:05:17 drochner Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -62,7 +62,6 @@ CFATTACH_DECL(pcib, sizeof(struct device),
pcibmatch, pcibattach, NULL, NULL);
void pcib_callback __P((struct device *));
-int pcib_print __P((void *, const char *));
int
pcibmatch(parent, match, aux)
@@ -201,23 +200,10 @@ pcib_callback(self)
* Attach the ISA bus behind this bridge.
*/
memset(&iba, 0, sizeof(iba));
- iba.iba_busname = "isa";
iba.iba_iot = X86_BUS_SPACE_IO;
iba.iba_memt = X86_BUS_SPACE_MEM;
#if NISA > 0
iba.iba_dmat = &isa_bus_dma_tag;
#endif
- config_found(self, &iba, pcib_print);
-}
-
-int
-pcib_print(aux, pnp)
- void *aux;
- const char *pnp;
-{
-
- /* Only ISAs can attach to pcib's; easy. */
- if (pnp)
- aprint_normal("isa at %s", pnp);
- return (UNCONF);
+ config_found_ia(self, "isabus", &iba, isabusprint);
}
diff --git a/sys/arch/i386/pci/pcmb.c b/sys/arch/i386/pci/pcmb.c
index 0e97e7e30ab..1ade97648c5 100644
--- a/sys/arch/i386/pci/pcmb.c
+++ b/sys/arch/i386/pci/pcmb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pcmb.c,v 1.9 2004/04/23 21:13:06 itojun Exp $ */
+/* $NetBSD: pcmb.c,v 1.10 2004/08/30 15:05:17 drochner Exp $ */
/*-
* Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcmb.c,v 1.9 2004/04/23 21:13:06 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcmb.c,v 1.10 2004/08/30 15:05:17 drochner Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -66,12 +66,6 @@ CFATTACH_DECL(pcmb, sizeof(struct device),
pcmbmatch, pcmbattach, NULL, NULL);
void pcmb_callback __P((struct device *));
-int pcmb_print __P((void *, const char *));
-
-union pcmb_attach_args {
- const char *ma_name; /* XXX should be common */
- struct mcabus_attach_args ma_mba;
-};
int
pcmbmatch(parent, match, aux)
@@ -116,30 +110,17 @@ void
pcmb_callback(self)
struct device *self;
{
- union pcmb_attach_args ma;
+ struct mcabus_attach_args ma;
/*
* Attach MCA bus behind this bridge.
*/
- ma.ma_mba.mba_busname = "mca";
- ma.ma_mba.mba_iot = X86_BUS_SPACE_IO;
- ma.ma_mba.mba_memt = X86_BUS_SPACE_MEM;
+ ma.mba_iot = X86_BUS_SPACE_IO;
+ ma.mba_memt = X86_BUS_SPACE_MEM;
#if NMCA > 0
- ma.ma_mba.mba_dmat = &mca_bus_dma_tag;
+ ma.mba_dmat = &mca_bus_dma_tag;
#endif
- ma.ma_mba.mba_mc = NULL;
- ma.ma_mba.mba_bus = 0;
- config_found(self, &ma.ma_mba, pcmb_print);
-}
-
-int
-pcmb_print(aux, pnp)
- void *aux;
- const char *pnp;
-{
- union pcmb_attach_args *ma = aux;
-
- if (pnp)
- aprint_normal("%s at %s", ma->ma_name, pnp);
- return (UNCONF);
+ ma.mba_mc = NULL;
+ ma.mba_bus = 0;
+ config_found_ia(self, "mcabus", &ma, mcabusprint);
}
diff --git a/sys/arch/i386/pnpbios/files.pnpbios b/sys/arch/i386/pnpbios/files.pnpbios
index 671cc934f03..1717c314d0f 100644
--- a/sys/arch/i386/pnpbios/files.pnpbios
+++ b/sys/arch/i386/pnpbios/files.pnpbios
@@ -1,9 +1,9 @@
-# $NetBSD: files.pnpbios,v 1.14 2004/01/31 13:59:20 jdolecek Exp $
+# $NetBSD: files.pnpbios,v 1.15 2004/08/30 15:05:17 drochner Exp $
defflag PNPBIOSVERBOSE
device pnpbios { [index = -1] }
-attach pnpbios at mainbus
+attach pnpbios at pnpbiosbus
file arch/i386/pnpbios/pnpbios.c pnpbios needs-flag
file arch/i386/pnpbios/pnpbioscall.S pnpbios
diff --git a/sys/arch/i386/pnpbios/pnpbios.c b/sys/arch/i386/pnpbios/pnpbios.c
index 5d62583d7ed..13fb5fd131a 100644
--- a/sys/arch/i386/pnpbios/pnpbios.c
+++ b/sys/arch/i386/pnpbios/pnpbios.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pnpbios.c,v 1.41 2004/07/04 06:18:26 mycroft Exp $ */
+/* $NetBSD: pnpbios.c,v 1.42 2004/08/30 15:05:17 drochner Exp $ */
/*
* Copyright (c) 2000 Jason R. Thorpe. All rights reserved.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pnpbios.c,v 1.41 2004/07/04 06:18:26 mycroft Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pnpbios.c,v 1.42 2004/08/30 15:05:17 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -252,11 +252,6 @@ pnpbios_match(parent, match, aux)
struct cfdata *match;
void *aux;
{
- struct pnpbios_attach_args *paa = aux;
-
- /* These are not the droids you're looking for. */
- if (strcmp(paa->paa_busname, "pnpbios") != 0)
- return (0);
/* There can be only one! */
if (pnpbios_softc != NULL)
diff --git a/sys/arch/ibmnws/ibmnws/mainbus.c b/sys/arch/ibmnws/ibmnws/mainbus.c
index ca6287c4b7b..fe75ded6936 100644
--- a/sys/arch/ibmnws/ibmnws/mainbus.c
+++ b/sys/arch/ibmnws/ibmnws/mainbus.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mainbus.c,v 1.1 2003/10/19 03:33:50 matt Exp $ */
+/* $NetBSD: mainbus.c,v 1.2 2004/08/30 15:05:17 drochner Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@@ -104,7 +104,7 @@ mainbus_attach(parent, self, aux)
ca.ca_name = "cpu";
ca.ca_node = 0;
- config_found(self, &ca, mainbus_print);
+ config_found_ia(self, "mainbus", &ca, mainbus_print);
#if NOBIO > 0
obio_reserve_resource_map();
@@ -131,7 +131,6 @@ mainbus_attach(parent, self, aux)
extent_destroy(memext);
#endif
- mba.mba_pba.pba_busname = "pci";
mba.mba_pba.pba_iot = &io_bus_space_tag;
mba.mba_pba.pba_memt = &mem_bus_space_tag;
mba.mba_pba.pba_dmat = &pci_bus_dma_tag;
@@ -139,7 +138,7 @@ mainbus_attach(parent, self, aux)
mba.mba_pba.pba_bus = 0;
mba.mba_pba.pba_bridgetag = NULL;
mba.mba_pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED;
- config_found(self, &mba.mba_pba, mainbus_print);
+ config_found_ia(self, "pcibus", &mba.mba_pba, pcibusprint);
#endif
#if NOBIO > 0
@@ -148,10 +147,10 @@ mainbus_attach(parent, self, aux)
if (platform->obiodevs != obiodevs_nodev) {
bzero(&mba, sizeof(mba));
- mba.mba_pba.pba_busname = "obio";
+ mba.mba_busname = "obio"; /* XXX needs placeholder in pba */
mba.mba_pba.pba_iot = &isa_io_space_tag;
mba.mba_pba.pba_memt = &isa_mem_space_tag;
- config_found(self, &mba.mba_pba, mainbus_print);
+ config_found_ia(self, "mainbus", &mba.mba_pba, mainbus_print);
}
#endif
#endif
@@ -166,8 +165,6 @@ mainbus_print(aux, pnp)
if (pnp)
aprint_normal("%s at %s", mba->mba_busname, pnp);
- if (!strcmp(mba->mba_busname, "pci"))
- aprint_normal(" bus %d", mba->mba_pba.pba_bus);
return (UNCONF);
}
diff --git a/sys/arch/ibmnws/pci/pcib.c b/sys/arch/ibmnws/pci/pcib.c
index 3d3d35b0925..e4119ec27d9 100644
--- a/sys/arch/ibmnws/pci/pcib.c
+++ b/sys/arch/ibmnws/pci/pcib.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pcib.c,v 1.2 2004/04/23 21:13:06 itojun Exp $ */
+/* $NetBSD: pcib.c,v 1.3 2004/08/30 15:05:18 drochner Exp $ */
/*-
* Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.2 2004/04/23 21:13:06 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.3 2004/08/30 15:05:18 drochner Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -68,7 +68,6 @@ CFATTACH_DECL(pcib, sizeof(struct pcib_softc),
pcibmatch, pcibattach, NULL, NULL);
void pcib_callback(struct device *);
-int pcib_print(void *, const char *);
int
pcibmatch(parent, cf, aux)
@@ -161,25 +160,12 @@ pcib_callback(self)
* Attach the ISA bus behind this bridge.
*/
memset(&iba, 0, sizeof(iba));
- iba.iba_busname = "isa";
iba.iba_ic = &sc->sc_chipset;
iba.iba_iot = &isa_io_bus_space_tag;
iba.iba_memt = &isa_mem_bus_space_tag;
#if NISADMA > 0
iba.iba_dmat = &isa_bus_dma_tag;
#endif
- config_found(&sc->sc_dev, &iba, pcib_print);
+ config_found_ia(&sc->sc_dev, "isabus", &iba, isabusprint);
#endif
}
-
-int
-pcib_print(aux, pnp)
- void *aux;
- const char *pnp;
-{
-
- /* Only ISAs can attach to pcib's; easy. */
- if (pnp)
- aprint_normal("isa at %s", pnp);
- return (UNCONF);
-}
diff --git a/sys/arch/macppc/macppc/mainbus.c b/sys/arch/macppc/macppc/mainbus.c
index 12d477a58e1..6e1f57d7f5d 100644
--- a/sys/arch/macppc/macppc/mainbus.c
+++ b/sys/arch/macppc/macppc/mainbus.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mainbus.c,v 1.13 2003/07/15 02:43:33 lukem Exp $ */
+/* $NetBSD: mainbus.c,v 1.14 2004/08/30 15:05:18 drochner Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.13 2003/07/15 02:43:33 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.14 2004/08/30 15:05:18 drochner Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -44,7 +44,6 @@ __KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.13 2003/07/15 02:43:33 lukem Exp $");
int mainbus_match __P((struct device *, struct cfdata *, void *));
void mainbus_attach __P((struct device *, struct device *, void *));
-int mainbus_print __P((void *, const char *));
CFATTACH_DECL(mainbus, sizeof(struct device),
mainbus_match, mainbus_attach, NULL, NULL);
@@ -103,16 +102,3 @@ mainbus_attach(parent, self, aux)
config_found(self, &ca, NULL);
}
}
-
-int
-mainbus_print(aux, pnp)
- void *aux;
- const char *pnp;
-{
- struct pcibus_attach_args *pa= aux;
-
- if (pnp)
- aprint_normal("%s at %s", pa->pba_busname, pnp);
- aprint_normal(" bus %d", pa->pba_bus);
- return UNCONF;
-}
diff --git a/sys/arch/macppc/pci/bandit.c b/sys/arch/macppc/pci/bandit.c
index 6fb0849520d..1c91aaf5d58 100644
--- a/sys/arch/macppc/pci/bandit.c
+++ b/sys/arch/macppc/pci/bandit.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bandit.c,v 1.23 2003/07/15 02:43:33 lukem Exp $ */
+/* $NetBSD: bandit.c,v 1.24 2004/08/30 15:05:18 drochner Exp $ */
/*-
* Copyright (c) 2000 Tsubai Masanari. All rights reserved.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bandit.c,v 1.23 2003/07/15 02:43:33 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bandit.c,v 1.24 2004/08/30 15:05:18 drochner Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -46,7 +46,6 @@ struct bandit_softc {
void bandit_attach __P((struct device *, struct device *, void *));
int bandit_match __P((struct device *, struct cfdata *, void *));
-int bandit_print __P((void *, const char *));
pcireg_t bandit_conf_read __P((pci_chipset_tag_t, pcitag_t, int));
void bandit_conf_write __P((pci_chipset_tag_t, pcitag_t, int, pcireg_t));
@@ -121,7 +120,6 @@ bandit_attach(parent, self, aux)
bandit_init(sc);
memset(&pba, 0, sizeof(pba));
- pba.pba_busname = "pci";
pba.pba_memt = pc->memt;
pba.pba_iot = pc->iot;
pba.pba_dmat = &pci_bus_dma_tag;
@@ -131,20 +129,7 @@ bandit_attach(parent, self, aux)
pba.pba_pc = pc;
pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED;
- config_found(self, &pba, bandit_print);
-}
-
-int
-bandit_print(aux, pnp)
- void *aux;
- const char *pnp;
-{
- struct pcibus_attach_args *pa = aux;
-
- if (pnp)
- aprint_normal("%s at %s", pa->pba_busname, pnp);
- aprint_normal(" bus %d", pa->pba_bus);
- return UNCONF;
+ config_found_ia(self, "pcibus", &pba, pcibusprint);
}
pcireg_t
diff --git a/sys/arch/macppc/pci/grackle.c b/sys/arch/macppc/pci/grackle.c
index e0714811e11..7a3c2984247 100644
--- a/sys/arch/macppc/pci/grackle.c
+++ b/sys/arch/macppc/pci/grackle.c
@@ -1,4 +1,4 @@
-/* $NetBSD: grackle.c,v 1.8 2003/07/15 02:43:33 lukem Exp $ */
+/* $NetBSD: grackle.c,v 1.9 2004/08/30 15:05:18 drochner Exp $ */
/*-
* Copyright (c) 2000 Tsubai Masanari. All rights reserved.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: grackle.c,v 1.8 2003/07/15 02:43:33 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grackle.c,v 1.9 2004/08/30 15:05:18 drochner Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -46,7 +46,6 @@ struct grackle_softc {
void grackle_attach __P((struct device *, struct device *, void *));
int grackle_match __P((struct device *, struct cfdata *, void *));
-int grackle_print __P((void *, const char *));
pcireg_t grackle_conf_read __P((pci_chipset_tag_t, pcitag_t, int));
void grackle_conf_write __P((pci_chipset_tag_t, pcitag_t, int, pcireg_t));
@@ -121,7 +120,6 @@ grackle_attach(parent, self, aux)
}
memset(&pba, 0, sizeof(pba));
- pba.pba_busname = "pci";
pba.pba_memt = pc->memt;
pba.pba_iot = pc->iot;
pba.pba_dmat = &pci_bus_dma_tag;
@@ -131,20 +129,7 @@ grackle_attach(parent, self, aux)
pba.pba_pc = pc;
pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED;
- config_found(self, &pba, grackle_print);
-}
-
-int
-grackle_print(aux, pnp)
- void *aux;
- const char *pnp;
-{
- struct pcibus_attach_args *pa = aux;
-
- if (pnp)
- aprint_normal("%s at %s", pa->pba_busname, pnp);
- aprint_normal(" bus %d", pa->pba_bus);
- return UNCONF;
+ config_found_ia(self, "pcibus", &pba, pcibusprint);
}
pcireg_t
diff --git a/sys/arch/macppc/pci/uninorth.c b/sys/arch/macppc/pci/uninorth.c
index e991cccf4ff..d0b66e5010d 100644
--- a/sys/arch/macppc/pci/uninorth.c
+++ b/sys/arch/macppc/pci/uninorth.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uninorth.c,v 1.9 2003/07/15 02:43:34 lukem Exp $ */
+/* $NetBSD: uninorth.c,v 1.10 2004/08/30 15:05:18 drochner Exp $ */
/*-
* Copyright (c) 2000 Tsubai Masanari. All rights reserved.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uninorth.c,v 1.9 2003/07/15 02:43:34 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uninorth.c,v 1.10 2004/08/30 15:05:18 drochner Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -46,7 +46,6 @@ struct uninorth_softc {
void uninorth_attach __P((struct device *, struct device *, void *));
int uninorth_match __P((struct device *, struct cfdata *, void *));
-int uninorth_print __P((void *, const char *));
pcireg_t uninorth_conf_read __P((pci_chipset_tag_t, pcitag_t, int));
void uninorth_conf_write __P((pci_chipset_tag_t, pcitag_t, int, pcireg_t));
@@ -133,7 +132,6 @@ uninorth_attach(parent, self, aux)
}
memset(&pba, 0, sizeof(pba));
- pba.pba_busname = "pci";
pba.pba_memt = pc->memt;
pba.pba_iot = pc->iot;
pba.pba_dmat = &pci_bus_dma_tag;
@@ -143,20 +141,7 @@ uninorth_attach(parent, self, aux)
pba.pba_pc = pc;
pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED;
- config_found(self, &pba, uninorth_print);
-}
-
-int
-uninorth_print(aux, pnp)
- void *aux;
- const char *pnp;
-{
- struct pcibus_attach_args *pa = aux;
-
- if (pnp)
- aprint_normal("%s at %s", pa->pba_busname, pnp);
- aprint_normal(" bus %d", pa->pba_bus);
- return UNCONF;
+ config_found_ia(self, "pcibus", &pba, pcibusprint);
}
pcireg_t
diff --git a/sys/arch/mipsco/isa/isa_machdep.c b/sys/arch/mipsco/isa/isa_machdep.c
index 28bddaceff8..19669f1abe8 100644
--- a/sys/arch/mipsco/isa/isa_machdep.c
+++ b/sys/arch/mipsco/isa/isa_machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: isa_machdep.c,v 1.5 2003/07/15 02:43:41 lukem Exp $ */
+/* $NetBSD: isa_machdep.c,v 1.6 2004/08/30 15:05:18 drochner Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.5 2003/07/15 02:43:41 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.6 2004/08/30 15:05:18 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -53,7 +53,7 @@ __KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.5 2003/07/15 02:43:41 lukem Exp $"
#include <dev/isa/isavar.h>
#include <dev/isa/isareg.h>
-static int isabusprint __P((void *auxp, const char *));
+static int mipscoisabusprint __P((void *auxp, const char *));
static int isabusmatch __P((struct device *, struct cfdata *, void *));
static void isabusattach __P((struct device *, struct device *, void *));
@@ -127,7 +127,6 @@ void *aux;
printf(":");
- iba.iba_busname = "isa";
iba.iba_iot = &isa_io_bst;
iba.iba_memt = &isa_mem_bst;
iba.iba_dmat = &isa_dmatag;
@@ -162,11 +161,11 @@ void *aux;
(*platform.intr_establish)(SYS_INTR_ATBUS, isa_intr, ic);
printf("\n");
- config_found(dp, &iba, isabusprint);
+ config_found_ia(dp, "isabus", &iba, mipscoisabusprint);
}
int
-isabusprint(auxp, name)
+mipscoisabusprint(auxp, name)
void *auxp;
const char *name;
{
diff --git a/sys/arch/mvmeppc/mvmeppc/cpu.c b/sys/arch/mvmeppc/mvmeppc/cpu.c
index 4eed494daf8..1f5f96dd81c 100644
--- a/sys/arch/mvmeppc/mvmeppc/cpu.c
+++ b/sys/arch/mvmeppc/mvmeppc/cpu.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.5 2003/07/15 02:43:52 lukem Exp $ */
+/* $NetBSD: cpu.c,v 1.6 2004/08/30 15:05:18 drochner Exp $ */
/*-
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.5 2003/07/15 02:43:52 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.6 2004/08/30 15:05:18 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -59,10 +59,7 @@ extern struct cfdriver cpu_cd;
int
cpumatch(struct device *parent, struct cfdata *cfdata, void *aux)
{
- struct confargs *ca = aux;
- if (strcmp(ca->ca_name, cpu_cd.cd_name) != 0)
- return (0);
if (cpu_info[0].ci_dev != NULL)
return (0);
return (1);
diff --git a/sys/arch/mvmeppc/mvmeppc/mainbus.c b/sys/arch/mvmeppc/mvmeppc/mainbus.c
index bb137b4684f..8122e835bbd 100644
--- a/sys/arch/mvmeppc/mvmeppc/mainbus.c
+++ b/sys/arch/mvmeppc/mvmeppc/mainbus.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mainbus.c,v 1.7 2003/07/15 02:43:52 lukem Exp $ */
+/* $NetBSD: mainbus.c,v 1.8 2004/08/30 15:05:18 drochner Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.7 2003/07/15 02:43:52 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.8 2004/08/30 15:05:18 drochner Exp $");
#include <sys/param.h>
#include <sys/extent.h>
@@ -55,10 +55,6 @@ CFATTACH_DECL(mainbus, sizeof(struct device),
int mainbus_print(void *, const char *);
-union mainbus_attach_args {
- const char *mba_busname; /* first elem of all */
- struct pcibus_attach_args mba_pba;
-};
/* There can be only one */
static int mainbus_found;
@@ -87,8 +83,7 @@ mainbus_attach(parent, self, aux)
struct device *self;
void *aux;
{
- union mainbus_attach_args mba;
- struct confargs ca;
+ struct pcibus_attach_args pba;
#ifdef PCI_NETBSD_CONFIGURE
struct extent *ioext, *memext;
#endif
@@ -97,9 +92,8 @@ mainbus_attach(parent, self, aux)
printf("\n");
- ca.ca_name = "cpu";
- ca.ca_node = 0;
- config_found(self, &ca, mainbus_print);
+ /* attach cpu */
+ config_found_ia(self, "mainbus", NULL, mainbus_print);
/*
* XXX Note also that the presence of a PCI bus should
@@ -120,15 +114,14 @@ mainbus_attach(parent, self, aux)
extent_destroy(memext);
#endif
- mba.mba_pba.pba_busname = "pci";
- mba.mba_pba.pba_iot = &mvmeppc_pci_io_bs_tag;
- mba.mba_pba.pba_memt = &mvmeppc_pci_mem_bs_tag;
- mba.mba_pba.pba_dmat = &pci_bus_dma_tag;
- mba.mba_pba.pba_dmat64 = NULL;
- mba.mba_pba.pba_bus = 0;
- mba.mba_pba.pba_bridgetag = NULL;
- mba.mba_pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED;
- config_found(self, &mba.mba_pba, mainbus_print);
+ pba.pba_iot = &mvmeppc_pci_io_bs_tag;
+ pba.pba_memt = &mvmeppc_pci_mem_bs_tag;
+ pba.pba_dmat = &pci_bus_dma_tag;
+ pba.pba_dmat64 = NULL;
+ pba.pba_bus = 0;
+ pba.pba_bridgetag = NULL;
+ pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED;
+ config_found_ia(self, "pcibus", &pba, pcibusprint);
#endif
}
@@ -137,12 +130,9 @@ mainbus_print(aux, pnp)
void *aux;
const char *pnp;
{
- union mainbus_attach_args *mba = aux;
if (pnp)
- aprint_normal("%s at %s", mba->mba_busname, pnp);
- if (!strcmp(mba->mba_busname, "pci"))
- aprint_normal(" bus %d", mba->mba_pba.pba_bus);
+ aprint_normal("cpu at %s", pnp);
return (UNCONF);
}
diff --git a/sys/arch/mvmeppc/pci/pcib.c b/sys/arch/mvmeppc/pci/pcib.c
index 37272b7c3de..b0f11dbc52d 100644
--- a/sys/arch/mvmeppc/pci/pcib.c
+++ b/sys/arch/mvmeppc/pci/pcib.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pcib.c,v 1.6 2004/04/23 21:13:06 itojun Exp $ */
+/* $NetBSD: pcib.c,v 1.7 2004/08/30 15:05:18 drochner Exp $ */
/*-
* Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.6 2004/04/23 21:13:06 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.7 2004/08/30 15:05:18 drochner Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -68,7 +68,6 @@ CFATTACH_DECL(pcib, sizeof(struct pcib_softc),
pcibmatch, pcibattach, NULL, NULL);
void pcib_callback(struct device *);
-int pcib_print(void *, const char *);
int
pcibmatch(parent, cf, aux)
@@ -165,25 +164,12 @@ pcib_callback(self)
* Attach the ISA bus behind this bridge.
*/
memset(&iba, 0, sizeof(iba));
- iba.iba_busname = "isa";
iba.iba_ic = &sc->sc_chipset;
iba.iba_iot = &mvmeppc_isa_io_bs_tag;
iba.iba_memt = &mvmeppc_isa_mem_bs_tag;
#if NISADMA > 0
iba.iba_dmat = &isa_bus_dma_tag;
#endif
- config_found(&sc->sc_dev, &iba, pcib_print);
+ config_found_ia(&sc->sc_dev, "isabus", &iba, isabusprint);
#endif
}
-
-int
-pcib_print(aux, pnp)
- void *aux;
- const char *pnp;
-{
-
- /* Only ISAs can attach to pcib's; easy. */
- if (pnp)
- aprint_normal("isa at %s", pnp);
- return (UNCONF);
-}
diff --git a/sys/arch/netwinder/pci/pcib.c b/sys/arch/netwinder/pci/pcib.c
index edec65adad5..457314216bd 100644
--- a/sys/arch/netwinder/pci/pcib.c
+++ b/sys/arch/netwinder/pci/pcib.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pcib.c,v 1.7 2004/04/23 21:13:06 itojun Exp $ */
+/* $NetBSD: pcib.c,v 1.8 2004/08/30 15:05:18 drochner Exp $ */
/*-
* Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.7 2004/04/23 21:13:06 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.8 2004/08/30 15:05:18 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -63,7 +63,6 @@ CFATTACH_DECL(pcib, sizeof(struct device),
pcibmatch, pcibattach, NULL, NULL);
void pcib_callback __P((struct device *));
-int pcib_print __P((void *, const char *));
int
pcibmatch(parent, match, aux)
@@ -127,23 +126,10 @@ pcib_callback(self)
* Attach the ISA bus behind this bridge.
*/
memset(&iba, 0, sizeof(iba));
- iba.iba_busname = "isa";
iba.iba_iot = &isa_io_bs_tag;
iba.iba_memt = &isa_mem_bs_tag;
#if NISADMA > 0
iba.iba_dmat = &isa_bus_dma_tag;
#endif
- config_found(self, &iba, pcib_print);
-}
-
-int
-pcib_print(aux, pnp)
- void *aux;
- const char *pnp;
-{
-
- /* Only ISAs can attach to pcib's; easy. */
- if (pnp)
- aprint_normal("isa at %s", pnp);
- return (UNCONF);
+ config_found_ia(self, "isabus", &iba, isabusprint);
}
diff --git a/sys/arch/ofppc/firepower/firepower.c b/sys/arch/ofppc/firepower/firepower.c
index 6645db45fb4..39c49dec31e 100644
--- a/sys/arch/ofppc/firepower/firepower.c
+++ b/sys/arch/ofppc/firepower/firepower.c
@@ -1,4 +1,4 @@
-/* $NetBSD: firepower.c,v 1.12 2003/12/14 05:20:57 thorpej Exp $ */
+/* $NetBSD: firepower.c,v 1.13 2004/08/30 15:05:18 drochner Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: firepower.c,v 1.12 2003/12/14 05:20:57 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: firepower.c,v 1.13 2004/08/30 15:05:18 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -235,8 +235,6 @@ void firepower_attach(struct device *, struct device *, void *);
CFATTACH_DECL(firepower, sizeof(struct firepower_softc),
firepower_match, firepower_attach, NULL, NULL);
-int firepower_print(void *, const char *);
-
/* There can be only one. */
struct firepower_config firepower_configuration;
int firepower_found;
@@ -338,7 +336,6 @@ firepower_attach(struct device *parent, struct device *self, void *aux)
firepower_dma_init(cp);
- pba.pba_busname = "pci";
pba.pba_iot = &cp->c_iot;
pba.pba_memt = &cp->c_memt;
pba.pba_dmat = &cp->c_dmat_pci;
@@ -348,17 +345,5 @@ firepower_attach(struct device *parent, struct device *self, void *aux)
pba.pba_bridgetag = NULL;
pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED |
PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY | PCI_FLAGS_MWI_OKAY;
- (void) config_found(self, &pba, firepower_print);
-}
-
-int
-firepower_print(void *aux, const char *pnp)
-{
- struct pcibus_attach_args *pba = aux;
-
- if (pnp)
- aprint_normal("%s at %s", pba->pba_busname, pnp);
- aprint_normal(" bus %d", pba->pba_bus);
-
- return (UNCONF);
+ (void) config_found_ia(self, "pcibus", &pba, pcibusprint);
}
diff --git a/sys/arch/powerpc/ibm4xx/pci/pchb.c b/sys/arch/powerpc/ibm4xx/pci/pchb.c
index 6595ccac4d7..f69a5547b45 100644
--- a/sys/arch/powerpc/ibm4xx/pci/pchb.c
+++ b/sys/arch/powerpc/ibm4xx/pci/pchb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pchb.c,v 1.2 2004/04/24 15:49:00 kleink Exp $ */
+/* $NetBSD: pchb.c,v 1.3 2004/08/30 15:05:18 drochner Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pchb.c,v 1.2 2004/04/24 15:49:00 kleink Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pchb.c,v 1.3 2004/08/30 15:05:18 drochner Exp $");
#include "pci.h"
#include "opt_pci.h"
@@ -181,7 +181,6 @@ pchbattach(struct device *parent, struct device *self, void *aux)
#ifdef PCI_CONFIGURE_VERBOSE
printf("running config_found PCI\n");
#endif
- pba.pba_busname = "pci";
/* IO window located @ e8000000 and maps to 0-0xffff */
pba.pba_iot = &pchb_io_tag;
/* PCI memory window is directly mapped */
@@ -191,7 +190,7 @@ pchbattach(struct device *parent, struct device *self, void *aux)
pba.pba_bus = 0;
pba.pba_bridgetag = NULL;
pba.pba_flags = PCI_FLAGS_MEM_ENABLED | PCI_FLAGS_IO_ENABLED;
- config_found(self, &pba, pchbprint);
+ config_found_ia(self, "pcibus", &pba, pchbprint);
}
diff --git a/sys/arch/prep/pci/pcib.c b/sys/arch/prep/pci/pcib.c
index ee857038769..155b3dddd1b 100644
--- a/sys/arch/prep/pci/pcib.c
+++ b/sys/arch/prep/pci/pcib.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pcib.c,v 1.12 2004/04/23 21:13:06 itojun Exp $ */
+/* $NetBSD: pcib.c,v 1.13 2004/08/30 15:05:18 drochner Exp $ */
/*-
* Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.12 2004/04/23 21:13:06 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.13 2004/08/30 15:05:18 drochner Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -68,7 +68,6 @@ CFATTACH_DECL(pcib, sizeof(struct pcib_softc),
pcibmatch, pcibattach, NULL, NULL);
void pcib_callback(struct device *);
-int pcib_print(void *, const char *);
int
pcibmatch(parent, cf, aux)
@@ -161,25 +160,12 @@ pcib_callback(self)
* Attach the ISA bus behind this bridge.
*/
memset(&iba, 0, sizeof(iba));
- iba.iba_busname = "isa";
iba.iba_ic = &sc->sc_chipset;
iba.iba_iot = &prep_isa_io_space_tag;
iba.iba_memt = &prep_isa_mem_space_tag;
#if NISADMA > 0
iba.iba_dmat = &isa_bus_dma_tag;
#endif
- config_found(&sc->sc_dev, &iba, pcib_print);
+ config_found_ia(&sc->sc_dev, "isabus", &iba, isabusprint);
#endif
}
-
-int
-pcib_print(aux, pnp)
- void *aux;
- const char *pnp;
-{
-
- /* Only ISAs can attach to pcib's; easy. */
- if (pnp)
- aprint_normal("isa at %s", pnp);
- return (UNCONF);
-}
diff --git a/sys/arch/prep/prep/mainbus.c b/sys/arch/prep/prep/mainbus.c
index 1262ec930ff..3ef89d0e78d 100644
--- a/sys/arch/prep/prep/mainbus.c
+++ b/sys/arch/prep/prep/mainbus.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mainbus.c,v 1.17 2003/07/15 02:54:52 lukem Exp $ */
+/* $NetBSD: mainbus.c,v 1.18 2004/08/30 15:05:18 drochner Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.17 2003/07/15 02:54:52 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.18 2004/08/30 15:05:18 drochner Exp $");
#include "opt_pci.h"
#include "opt_residual.h"
@@ -115,7 +115,7 @@ mainbus_attach(parent, self, aux)
ca.ca_name = "cpu";
ca.ca_node = 0;
- config_found(self, &ca, mainbus_print);
+ config_found_ia(self, "mainbus", &ca, mainbus_print);
#if NOBIO > 0
obio_reserve_resource_map();
@@ -142,7 +142,6 @@ mainbus_attach(parent, self, aux)
extent_destroy(memext);
#endif
- mba.mba_pba.pba_busname = "pci";
mba.mba_pba.pba_iot = &prep_io_space_tag;
mba.mba_pba.pba_memt = &prep_mem_space_tag;
mba.mba_pba.pba_dmat = &pci_bus_dma_tag;
@@ -151,7 +150,7 @@ mainbus_attach(parent, self, aux)
mba.mba_pba.pba_bus = 0;
mba.mba_pba.pba_bridgetag = NULL;
mba.mba_pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED;
- config_found(self, &mba.mba_pba, mainbus_print);
+ config_found_ia(self, "pcibus", &mba.mba_pba, pcibusprint);
#endif
#if NOBIO > 0
@@ -159,10 +158,10 @@ mainbus_attach(parent, self, aux)
if (platform->obiodevs != obiodevs_nodev) {
bzero(&mba, sizeof(mba));
- mba.mba_pba.pba_busname = "obio";
+ mba.mba_busname = "obio"; /* XXX needs placeholder in pba */
mba.mba_pba.pba_iot = &prep_isa_io_space_tag;
mba.mba_pba.pba_memt = &prep_isa_mem_space_tag;
- config_found(self, &mba.mba_pba, mainbus_print);
+ config_found_ia(self, "mainbus", &mba.mba_pba, mainbus_print);
}
#endif
}
@@ -176,8 +175,6 @@ mainbus_print(aux, pnp)
if (pnp)
aprint_normal("%s at %s", mba->mba_busname, pnp);
- if (!strcmp(mba->mba_busname, "pci"))
- aprint_normal(" bus %d", mba->mba_pba.pba_bus);
return (UNCONF);
}
diff --git a/sys/arch/sandpoint/pci/pcib.c b/sys/arch/sandpoint/pci/pcib.c
index 0da0ad5d01f..bf2b00c4aa7 100644
--- a/sys/arch/sandpoint/pci/pcib.c
+++ b/sys/arch/sandpoint/pci/pcib.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pcib.c,v 1.10 2004/04/23 21:13:06 itojun Exp $ */
+/* $NetBSD: pcib.c,v 1.11 2004/08/30 15:05:18 drochner Exp $ */
/*-
* Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.10 2004/04/23 21:13:06 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.11 2004/08/30 15:05:18 drochner Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -67,7 +67,6 @@ CFATTACH_DECL(pcib, sizeof(struct pcib_softc),
pcibmatch, pcibattach, NULL, NULL);
void pcib_callback __P((struct device *));
-int pcib_print __P((void *, const char *));
extern struct powerpc_bus_space sandpoint_isa_io_bs_tag;
extern struct powerpc_bus_space sandpoint_isa_mem_bs_tag;
@@ -122,7 +121,6 @@ pcib_callback(self)
* Attach the ISA bus behind this bridge.
*/
memset(&iba, 0, sizeof(iba));
- iba.iba_busname = "isa";
iba.iba_ic = &sc->sc_chipset;
iba.iba_iot = &sandpoint_isa_io_bs_tag;
iba.iba_memt = &sandpoint_isa_mem_bs_tag;
@@ -130,17 +128,5 @@ pcib_callback(self)
iba.iba_dmat = &isa_bus_dma_tag;
#endif
- config_found(&sc->sc_dev, &iba, pcib_print);
-}
-
-int
-pcib_print(aux, pnp)
- void *aux;
- const char *pnp;
-{
-
- /* Only ISAs can attach to pcib's; easy. */
- if (pnp)
- aprint_normal("isa at %s", pnp);
- return (UNCONF);
+ config_found(&sc->sc_dev, "isabus", &iba, isabusprint);
}
diff --git a/sys/arch/sandpoint/sandpoint/mainbus.c b/sys/arch/sandpoint/sandpoint/mainbus.c
index 0761a948d95..e946c4fe63c 100644
--- a/sys/arch/sandpoint/sandpoint/mainbus.c
+++ b/sys/arch/sandpoint/sandpoint/mainbus.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mainbus.c,v 1.16 2004/07/29 18:39:00 drochner Exp $ */
+/* $NetBSD: mainbus.c,v 1.17 2004/08/30 15:05:18 drochner Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.16 2004/07/29 18:39:00 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.17 2004/08/30 15:05:18 drochner Exp $");
#include <sys/param.h>
#include <sys/extent.h>
@@ -59,11 +59,6 @@ CFATTACH_DECL(mainbus, sizeof(struct device),
int mainbus_print __P((void *, const char *));
-union mainbus_attach_args {
- const char *mba_busname; /* first elem of all */
- struct pcibus_attach_args mba_pba;
-};
-
/*
* Probe for the mainbus; always succeeds.
*/
@@ -85,7 +80,7 @@ mainbus_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- union mainbus_attach_args mba;
+ struct pcibus_attach_args pba;
#if defined(PCI_NETBSD_CONFIGURE)
struct extent *ioext, *memext;
#endif
@@ -95,8 +90,7 @@ mainbus_attach(parent, self, aux)
/*
* Always find the CPU
*/
- mba.mba_busname = "cpu";
- config_found(self, &mba, mainbus_print);
+ config_found_ia(self, "mainbus", NULL, mainbus_print);
/*
* XXX Note also that the presence of a PCI bus should
@@ -119,17 +113,16 @@ mainbus_attach(parent, self, aux)
extent_destroy(memext);
#endif
- mba.mba_pba.pba_busname = "pci";
- mba.mba_pba.pba_iot = &sandpoint_io_bs_tag;
- mba.mba_pba.pba_memt = &sandpoint_mem_bs_tag;
- mba.mba_pba.pba_dmat = &pci_bus_dma_tag;
- mba.mba_pba.pba_dmat64 = NULL;
- mba.mba_pba.pba_bus = 0;
- mba.mba_pba.pba_pc = 0;
- mba.mba_pba.pba_bridgetag = NULL;
- mba.mba_pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED;
-
- config_found(self, &mba.mba_pba, mainbus_print);
+ pba.pba_iot = &sandpoint_io_bs_tag;
+ pba.pba_memt = &sandpoint_mem_bs_tag;
+ pba.pba_dmat = &pci_bus_dma_tag;
+ pba.pba_dmat64 = NULL;
+ pba.pba_bus = 0;
+ pba.pba_pc = 0;
+ pba.pba_bridgetag = NULL;
+ pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED;
+
+ config_found_ia(self, "pcibus", &pba, pcibusprint);
#endif
}
@@ -144,10 +137,6 @@ extern struct cfdriver cpu_cd;
int
cpu_match(struct device *parent, struct cfdata *cf, void *aux)
{
- union mainbus_attach_args *mba = aux;
-
- if (strcmp(mba->mba_busname, cpu_cd.cd_name) != 0)
- return 0;
if (cpu_info[0].ci_dev != NULL)
return 0;
@@ -158,6 +147,7 @@ cpu_match(struct device *parent, struct cfdata *cf, void *aux)
void
cpu_attach(struct device *parent, struct device *self, void *aux)
{
+
(void) cpu_attach_common(self, 0);
}
@@ -166,11 +156,8 @@ mainbus_print(aux, pnp)
void *aux;
const char *pnp;
{
- union mainbus_attach_args *mba = aux;
if (pnp)
- aprint_normal("%s at %s", mba->mba_busname, pnp);
- if (!strcmp(mba->mba_busname, "pci"))
- aprint_normal(" bus %d", mba->mba_pba.pba_bus);
+ aprint_normal("cpu at %s", pnp);
return (UNCONF);
}
diff --git a/sys/arch/sgimips/mace/pci_mace.c b/sys/arch/sgimips/mace/pci_mace.c
index 256492de8eb..57c64c8813f 100644
--- a/sys/arch/sgimips/mace/pci_mace.c
+++ b/sys/arch/sgimips/mace/pci_mace.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_mace.c,v 1.2 2004/01/19 10:28:28 sekiya Exp $ */
+/* $NetBSD: pci_mace.c,v 1.3 2004/08/30 15:05:18 drochner Exp $ */
/*
* Copyright (c) 2001,2003 Christopher Sekiya
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_mace.c,v 1.2 2004/01/19 10:28:28 sekiya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_mace.c,v 1.3 2004/08/30 15:05:18 drochner Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -80,7 +80,6 @@ struct macepci_softc {
static int macepci_match(struct device *, struct cfdata *, void *);
static void macepci_attach(struct device *, struct device *, void *);
-static int macepci_print(void *, const char *);
pcireg_t macepci_conf_read(pci_chipset_tag_t, pcitag_t, int);
void macepci_conf_write(pci_chipset_tag_t, pcitag_t, int, pcireg_t);
int macepci_intr(void *);
@@ -201,7 +200,6 @@ macepci_attach(parent, self, aux)
#if NPCI > 0
memset(&pba, 0, sizeof pba);
- pba.pba_busname = "pci";
/*XXX*/ pba.pba_iot = SGIMIPS_BUS_SPACE_IO;
/*XXX*/ pba.pba_memt = SGIMIPS_BUS_SPACE_MEM;
pba.pba_dmat = &pci_bus_dma_tag;
@@ -219,26 +217,10 @@ macepci_attach(parent, self, aux)
cpu_intr_establish(maa->maa_intr, IPL_NONE, macepci_intr, sc);
- config_found(self, &pba, macepci_print);
+ config_found_ia(self, "pcibus", &pba, pcibusprint);
#endif
}
-
-static int
-macepci_print(aux, pnp)
- void *aux;
- const char *pnp;
-{
- struct pcibus_attach_args *pba = aux;
-
- if (pnp != 0)
- aprint_normal("%s at %s", pba->pba_busname, pnp);
- else
- aprint_normal(" bus %d", pba->pba_bus);
-
- return UNCONF;
-}
-
pcireg_t
macepci_conf_read(pc, tag, reg)
pci_chipset_tag_t pc;
diff --git a/sys/arch/sh5/pci/sh5_pci.c b/sys/arch/sh5/pci/sh5_pci.c
index 7f0820b3f5f..24505e392ff 100644
--- a/sys/arch/sh5/pci/sh5_pci.c
+++ b/sys/arch/sh5/pci/sh5_pci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sh5_pci.c,v 1.11 2004/02/13 11:36:17 wiz Exp $ */
+/* $NetBSD: sh5_pci.c,v 1.12 2004/08/30 15:05:18 drochner Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sh5_pci.c,v 1.11 2004/02/13 11:36:17 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sh5_pci.c,v 1.12 2004/08/30 15:05:18 drochner Exp $");
#include "opt_pci.h"
@@ -358,7 +358,6 @@ sh5pciattach(struct device *parent, struct device *self, void *args)
(void) sh5pci_check_master_abort(sc);
#endif
- pba.pba_busname = "pci";
pba.pba_pc = &sh5pci_chipset_tag;
pba.pba_bus = 0;
pba.pba_bridgetag = NULL;
@@ -367,7 +366,7 @@ sh5pciattach(struct device *parent, struct device *self, void *args)
pba.pba_dmat = &sh5pci_dma_tag;
pba.pba_iot = &sh5pci_io_tag;
pba.pba_memt = &sh5pci_mem_tag;
- config_found(self, &pba, sh5pciprint);
+ config_found_ia(self, "pcibus", &pba, sh5pciprint);
}
/*ARGSUSED*/
diff --git a/sys/arch/sparc/conf/files.sparc b/sys/arch/sparc/conf/files.sparc
index 93992ab2819..4c0c6f8b38e 100644
--- a/sys/arch/sparc/conf/files.sparc
+++ b/sys/arch/sparc/conf/files.sparc
@@ -1,4 +1,4 @@
-# $NetBSD: files.sparc,v 1.128 2004/04/03 17:43:50 chs Exp $
+# $NetBSD: files.sparc,v 1.129 2004/08/30 15:05:18 drochner Exp $
# @(#)files.sparc 8.1 (Berkeley) 7/19/93
# sparc-specific configuration info
@@ -29,7 +29,7 @@ attach mspcic at msiiep
file arch/sparc/sparc/msiiep.c msiiep | mspcic
file arch/sparc/sparc/pci_machdep.c msiiep | mspcic
-device ebus {[addr = -1]}: pcibus
+device ebus {[addr = -1]}
attach ebus at pci
file arch/sparc/dev/ebus.c ebus
diff --git a/sys/arch/sparc/sparc/msiiep.c b/sys/arch/sparc/sparc/msiiep.c
index 1c287168f0a..345e9ca9a6b 100644
--- a/sys/arch/sparc/sparc/msiiep.c
+++ b/sys/arch/sparc/sparc/msiiep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: msiiep.c,v 1.22 2004/07/10 22:30:29 martin Exp $ */
+/* $NetBSD: msiiep.c,v 1.23 2004/08/30 15:05:18 drochner Exp $ */
/*
* Copyright (c) 2001 Valeriy E. Ushakov
@@ -27,7 +27,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msiiep.c,v 1.22 2004/07/10 22:30:29 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msiiep.c,v 1.23 2004/08/30 15:05:18 drochner Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
@@ -335,7 +335,6 @@ mspcic_attach(parent, self, aux)
/*
* Attach the PCI bus.
*/
- pba.pba_busname = "pci";
pba.pba_bus = 0;
pba.pba_bridgetag = NULL;
pba.pba_iot = sc->sc_iot;
@@ -345,7 +344,7 @@ mspcic_attach(parent, self, aux)
pba.pba_pc = &mspcic_pc_tag;
pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED;
- config_found(self, &pba, mspcic_print);
+ config_found_ia(self, "pcibus", &pba, mspcic_print);
}
diff --git a/sys/arch/sparc64/dev/psycho.c b/sys/arch/sparc64/dev/psycho.c
index e4adf6ca96a..e7d9fc3442c 100644
--- a/sys/arch/sparc64/dev/psycho.c
+++ b/sys/arch/sparc64/dev/psycho.c
@@ -1,4 +1,4 @@
-/* $NetBSD: psycho.c,v 1.72 2004/03/28 09:31:21 nakayama Exp $ */
+/* $NetBSD: psycho.c,v 1.73 2004/08/30 15:05:19 drochner Exp $ */
/*
* Copyright (c) 2001, 2002 Eduardo E. Horvath
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: psycho.c,v 1.72 2004/03/28 09:31:21 nakayama Exp $");
+__KERNEL_RCSID(0, "$NetBSD: psycho.c,v 1.73 2004/08/30 15:05:19 drochner Exp $");
#include "opt_ddb.h"
@@ -636,14 +636,13 @@ found:
/*
* attach the pci.. note we pass PCI A tags, etc., for the sabre here.
*/
- pba.pba_busname = "pci";
pba.pba_flags = sc->sc_psycho_this->pp_flags;
pba.pba_dmat = sc->sc_psycho_this->pp_dmat;
pba.pba_dmat64 = NULL;
pba.pba_iot = sc->sc_psycho_this->pp_iot;
pba.pba_memt = sc->sc_psycho_this->pp_memt;
- config_found(self, &pba, psycho_print);
+ config_found_ia(self, "pcibus", &pba, psycho_print);
}
static int
diff --git a/sys/arch/x86/conf/files.x86 b/sys/arch/x86/conf/files.x86
index b40250771b9..ee2bcc51213 100644
--- a/sys/arch/x86/conf/files.x86
+++ b/sys/arch/x86/conf/files.x86
@@ -1,4 +1,4 @@
-# $NetBSD: files.x86,v 1.10 2003/10/08 17:30:00 bouyer Exp $
+# $NetBSD: files.x86,v 1.11 2004/08/30 15:05:19 drochner Exp $
# options for MP configuration through the MP spec
defflag opt_mpbios.h MPBIOS MPVERBOSE MPDEBUG MPBIOS_SCANPCI
@@ -7,7 +7,7 @@ defflag opt_mpacpi.h MPACPI MPACPI_SCANPCI
# MTRR support
defflag MTRR
-define mainbus { [apid = -1] }
+define cpubus { [apid = -1] }
file arch/x86/x86/apic.c ioapic | lapic
file arch/x86/x86/bus_dma.c
@@ -25,7 +25,7 @@ define lapic
file arch/x86/x86/lapic.c lapic needs-flag
device ioapic: lapic
-attach ioapic at mainbus
+attach ioapic at cpubus
file arch/x86/x86/ioapic.c ioapic needs-flag
# MP configuration using Intel SMP specification 1.4
diff --git a/sys/arch/x86/x86/mpacpi.c b/sys/arch/x86/x86/mpacpi.c
index 6a17e6a0bc6..0c4ebc688d7 100644
--- a/sys/arch/x86/x86/mpacpi.c
+++ b/sys/arch/x86/x86/mpacpi.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mpacpi.c,v 1.29 2004/05/23 05:57:57 kochi Exp $ */
+/* $NetBSD: mpacpi.c,v 1.30 2004/08/30 15:05:19 drochner Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mpacpi.c,v 1.29 2004/05/23 05:57:57 kochi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpacpi.c,v 1.30 2004/08/30 15:05:19 drochner Exp $");
#include "opt_acpi.h"
#include "opt_mpbios.h"
@@ -93,7 +93,8 @@ static TAILQ_HEAD(, mpacpi_pcibus) mpacpi_pcibusses;
#endif
static int mpacpi_print(void *, const char *);
-static int mpacpi_match(struct device *, struct cfdata *, void *);
+static int mpacpi_submatch(struct device *, struct cfdata *,
+ const locdesc_t *, void *);
/* acpi_madt_walk callbacks */
static ACPI_STATUS mpacpi_count(APIC_HEADER *, void *);
@@ -141,7 +142,8 @@ mpacpi_print(void *aux, const char *pnp)
}
static int
-mpacpi_match(struct device *parent, struct cfdata *cf, void *aux)
+mpacpi_submatch(struct device *parent, struct cfdata *cf,
+ const locdesc_t *ldesc, void *aux)
{
struct cpu_attach_args * caa = (struct cpu_attach_args *) aux;
if (strcmp(caa->caa_name, cf->cf_name))
@@ -296,8 +298,8 @@ mpacpi_config_cpu(APIC_HEADER *hdrp, void *aux)
caa.caa_name = "cpu";
caa.cpu_number = p->LocalApicId;
caa.cpu_func = &mp_cpu_funcs;
- config_found_sm(parent, &caa, mpacpi_print,
- mpacpi_match);
+ config_found_sm_loc(parent, "cpubus", NULL,
+ &caa, mpacpi_print, mpacpi_submatch);
}
}
return AE_OK;
@@ -318,7 +320,8 @@ mpacpi_config_ioapic(APIC_HEADER *hdrp, void *aux)
aaa.apic_version = -1;
aaa.flags = IOAPIC_VWIRE;
aaa.apic_vecbase = p->Interrupt;
- config_found_sm(parent, &aaa, mpacpi_print, mpacpi_match);
+ config_found_sm_loc(parent, "cpubus", NULL, &aaa,
+ mpacpi_print, mpacpi_submatch);
}
return AE_OK;
}
@@ -955,7 +958,7 @@ mpacpi_scan_pci(struct device *self, struct pcibus_attach_args *pba,
continue;
if (!strcmp(mpb->mb_name, "pci") && mpb->mb_configured == 0) {
pba->pba_bus = i;
- config_found(self, pba, print);
+ config_found_ia(self, "pcibus", pba, print);
}
}
return 0;
diff --git a/sys/arch/x86/x86/mpbios.c b/sys/arch/x86/x86/mpbios.c
index afbeb0bb62a..88ee5f30f93 100644
--- a/sys/arch/x86/x86/mpbios.c
+++ b/sys/arch/x86/x86/mpbios.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mpbios.c,v 1.21 2004/05/05 04:51:28 kochi Exp $ */
+/* $NetBSD: mpbios.c,v 1.22 2004/08/30 15:05:19 drochner Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -103,7 +103,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mpbios.c,v 1.21 2004/05/05 04:51:28 kochi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpbios.c,v 1.22 2004/08/30 15:05:19 drochner Exp $");
#include "opt_mpacpi.h"
#include "opt_mpbios.h"
@@ -172,7 +172,8 @@ struct mp_map
};
int mp_print __P((void *, const char *));
-int mp_match __P((struct device *,struct cfdata *,void *));
+int mp_submatch __P((struct device *, struct cfdata *,
+ const locdesc_t *, void *));
static const void *mpbios_search __P((struct device *, paddr_t, int,
struct mp_map *));
static inline int mpbios_cksum __P((const void *,int));
@@ -223,9 +224,10 @@ mp_print(aux, pnp)
}
int
-mp_match(parent, cf, aux)
+mp_submatch(parent, cf, ldesc, aux)
struct device *parent;
struct cfdata *cf;
+ const locdesc_t *ldesc;
void *aux;
{
struct cpu_attach_args * caa = (struct cpu_attach_args *) aux;
@@ -713,7 +715,7 @@ mpbios_cpu(ent, self)
caa.cpu_number = entry->apic_id;
caa.cpu_func = &mp_cpu_funcs;
- config_found_sm(self, &caa, mp_print, mp_match);
+ config_found_sm_loc(self, "cpubus", NULL, &caa, mp_print, mp_submatch);
}
static void
@@ -1021,7 +1023,7 @@ mpbios_ioapic(ent, self)
aaa.apic_vecbase = -1;
aaa.flags = (mp_fps->mpfb2 & 0x80) ? IOAPIC_PICMODE : IOAPIC_VWIRE;
- config_found_sm(self, &aaa, mp_print, mp_match);
+ config_found_sm_loc(self, "cpubus", NULL, &aaa, mp_print, mp_submatch);
}
static const char inttype_fmt[] = "\177\020"
@@ -1197,7 +1199,7 @@ mpbios_scan_pci(struct device *self, struct pcibus_attach_args *pba,
continue;
if (!strcmp(mpb->mb_name, "pci") && mpb->mb_configured == 0) {
pba->pba_bus = i;
- config_found(self, pba, print);
+ config_found_ia(self, "pcibus", pba, print);
}
}
return 0;
diff --git a/sys/arch/xen/conf/files.xen b/sys/arch/xen/conf/files.xen
index 421275d046a..7607c91fb96 100644
--- a/sys/arch/xen/conf/files.xen
+++ b/sys/arch/xen/conf/files.xen
@@ -1,4 +1,4 @@
-# $NetBSD: files.xen,v 1.12 2004/05/07 15:51:04 cl Exp $
+# $NetBSD: files.xen,v 1.13 2004/08/30 15:05:19 drochner Exp $
# NetBSD: files.x86,v 1.10 2003/10/08 17:30:00 bouyer Exp
# NetBSD: files.i386,v 1.254 2004/03/25 23:32:10 jmc Exp
@@ -81,9 +81,6 @@ file crypto/blowfish/arch/i386/bf_cbc.S blowfish & !i386_cpu
# Memory Disk for install floppy
file dev/md_root.c memory_disk_hooks
-#
-define mainbus { [apid = -1] }
-
file arch/x86/x86/bus_dma.c
file arch/xen/x86/bus_space.c
file arch/x86/x86/cacheinfo.c
@@ -95,17 +92,26 @@ file arch/x86/x86/softintr.c
include "arch/xen/conf/files.compat"
+# i386 specific mainbus attributes
+define cpubus { [apid = -1] }
+define apmbus {}
+define pnpbiosbus {}
+define vesabiosbus {}
+define hypervisorbus {}
+
#
# System bus types
#
-device mainbus: mainbus
+device mainbus: isabus, eisabus, mcabus, pcibus, acpibus,
+ cpubus, apmbus, pnpbiosbus, vesabiosbus,
+ hypervisorbus
attach mainbus at root
file arch/xen/i386/mainbus.c mainbus
# Xen hypervisor
device hypervisor { }
-attach hypervisor at mainbus
+attach hypervisor at hypervisorbus
file arch/xen/xen/hypervisor.c hypervisor needs-flag
# Numeric Processing Extension; Math Co-processor
@@ -127,9 +133,8 @@ include "dev/pckbport/files.pckbport"
# CPUS
-define cpu { [apid = -1] }
device cpu
-attach cpu at mainbus
+attach cpu at cpubus
file arch/xen/i386/cpu.c cpu
#
diff --git a/sys/arch/xen/i386/mainbus.c b/sys/arch/xen/i386/mainbus.c
index 1ab185ee1c8..2d4a42c84df 100644
--- a/sys/arch/xen/i386/mainbus.c
+++ b/sys/arch/xen/i386/mainbus.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mainbus.c,v 1.3 2004/04/24 17:35:27 cl Exp $ */
+/* $NetBSD: mainbus.c,v 1.4 2004/08/30 15:05:19 drochner Exp $ */
/* NetBSD: mainbus.c,v 1.53 2003/10/27 14:11:47 junyoung Exp */
/*
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.3 2004/04/24 17:35:27 cl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.4 2004/08/30 15:05:19 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -236,14 +236,14 @@ mainbus_attach(parent, self, aux)
caa.cpu_role = CPU_ROLE_SP;
caa.cpu_func = 0;
- config_found(self, &caa, mainbus_print);
+ config_found_ia(self, "cpubus", &caa, mainbus_print);
}
}
#if NVESABIOS > 0
if (vbeprobe()) {
mba.mba_vba.vaa_busname = "vesabios";
- config_found(self, &mba.mba_vba, mainbus_print);
+ config_found_ia(self, "vesabiosbus", &mba.mba_vba, mainbus_print);
}
#endif
@@ -266,7 +266,7 @@ mainbus_attach(parent, self, aux)
PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY |
PCI_FLAGS_MWI_OKAY;
mba.mba_acpi.aa_ic = &x86_isa_chipset;
- config_found(self, &mba.mba_acpi, mainbus_print);
+ config_found_ia(self, "acpibus", &mba.mba_acpi, mainbus_print);
#if 0 /* XXXJRT not yet */
if (acpi_active) {
/*
@@ -286,7 +286,8 @@ mainbus_attach(parent, self, aux)
if (pnpbios_probe()) {
mba.mba_paa.paa_busname = "pnpbios";
mba.mba_paa.paa_ic = &x86_isa_chipset;
- config_found(self, &mba.mba_paa, mainbus_print);
+ config_found_ia(self, "pnpbuisbus", &mba.mba_paa,
+ mainbus_print);
}
#endif
@@ -298,7 +299,6 @@ mainbus_attach(parent, self, aux)
*/
#if NPCI > 0
if (pci_mode != 0) {
- mba.mba_pba.pba_busname = "pci";
mba.mba_pba.pba_iot = X86_BUS_SPACE_IO;
mba.mba_pba.pba_memt = X86_BUS_SPACE_MEM;
mba.mba_pba.pba_dmat = &pci_bus_dma_tag;
@@ -309,47 +309,45 @@ mainbus_attach(parent, self, aux)
mba.mba_pba.pba_bridgetag = NULL;
#if defined(MPACPI) && defined(MPACPI_SCANPCI)
if (mpacpi_active)
- mpacpi_scan_pci(self, &mba.mba_pba, mainbus_print);
+ mpacpi_scan_pci(self, &mba.mba_pba, pcibusprint);
else
#endif
#if defined(MPBIOS) && defined(MPBIOS_SCANPCI)
if (mpbios_scanned != 0)
- mpbios_scan_pci(self, &mba.mba_pba, mainbus_print);
+ mpbios_scan_pci(self, &mba.mba_pba, pcibusprint);
else
#endif
- config_found(self, &mba.mba_pba, mainbus_print);
+ config_found_ia(self, "pcibus", &mba.mba_pba, pcibusprint);
}
#endif
#if NMCA > 0
/* Note: MCA bus probe is done in i386/machdep.c */
if (MCA_system) {
- mba.mba_mba.mba_busname = "mca";
mba.mba_mba.mba_iot = X86_BUS_SPACE_IO;
mba.mba_mba.mba_memt = X86_BUS_SPACE_MEM;
mba.mba_mba.mba_dmat = &mca_bus_dma_tag;
mba.mba_mba.mba_mc = NULL;
mba.mba_mba.mba_bus = 0;
- config_found(self, &mba.mba_mba, mainbus_print);
+ config_found_ia(self, "mcabus", &mba.mba_mba, mcabusprint);
}
#endif
#ifndef XEN
if (memcmp(ISA_HOLE_VADDR(EISA_ID_PADDR), EISA_ID, EISA_ID_LEN) == 0 &&
eisa_has_been_seen == 0) {
- mba.mba_eba.eba_busname = "eisa";
mba.mba_eba.eba_iot = X86_BUS_SPACE_IO;
mba.mba_eba.eba_memt = X86_BUS_SPACE_MEM;
#if NEISA > 0
mba.mba_eba.eba_dmat = &eisa_bus_dma_tag;
#endif
- config_found(self, &mba.mba_eba, mainbus_print);
+ config_found_ia(self, "eisabus", &mba.mba_eba, eisabusprint);
}
#endif
#if NISA > 0
if (isa_has_been_seen == 0)
- config_found(self, &mba_iba, mainbus_print);
+ config_found_ia(self, "isabus", &mba_iba, isabusprint);
#endif
#if NAPM > 0
@@ -358,13 +356,13 @@ mainbus_attach(parent, self, aux)
#endif
if (apm_busprobe()) {
mba.mba_aaa.aaa_busname = "apm";
- config_found(self, &mba.mba_aaa, mainbus_print);
+ config_found_ia(self, "apmbus", &mba.mba_aaa, mainbus_print);
}
#endif
#if NHYPERVISOR > 0
mba.mba_haa.haa_busname = "hypervisor";
- config_found(self, &mba.mba_haa, mainbus_print);
+ config_found_ia(self, "hypervisorbus", &mba.mba_haa, mainbus_print);
#endif
}
@@ -377,7 +375,5 @@ mainbus_print(aux, pnp)
if (pnp)
aprint_normal("%s at %s", mba->mba_busname, pnp);
- if (strcmp(mba->mba_busname, "pci") == 0)
- aprint_normal(" bus %d", mba->mba_pba.pba_bus);
return (UNCONF);
}
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c
index d79763026bf..339fd648ff1 100644
--- a/sys/dev/acpi/acpi.c
+++ b/sys/dev/acpi/acpi.c
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi.c,v 1.66 2004/06/07 15:33:17 kochi Exp $ */
+/* $NetBSD: acpi.c,v 1.67 2004/08/30 15:05:19 drochner Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.66 2004/06/07 15:33:17 kochi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.67 2004/08/30 15:05:19 drochner Exp $");
#include "opt_acpi.h"
@@ -223,11 +223,6 @@ acpi_probe(void)
static int
acpi_match(struct device *parent, struct cfdata *match, void *aux)
{
- struct acpibus_attach_args *aa = aux;
-
- if (strcmp(aa->aa_busname, acpi_cd.cd_name) != 0)
- return 0;
-
/*
* XXX Check other locators? Hard to know -- machine
* dependent code has already checked for the presence
diff --git a/sys/dev/cardbus/rbus_ppb.c b/sys/dev/cardbus/rbus_ppb.c
index f37fc958985..5107823be50 100644
--- a/sys/dev/cardbus/rbus_ppb.c
+++ b/sys/dev/cardbus/rbus_ppb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rbus_ppb.c,v 1.12 2004/08/02 19:14:28 mycroft Exp $ */
+/* $NetBSD: rbus_ppb.c,v 1.13 2004/08/30 15:05:19 drochner Exp $ */
/*
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rbus_ppb.c,v 1.12 2004/08/02 19:14:28 mycroft Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rbus_ppb.c,v 1.13 2004/08/30 15:05:19 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -768,8 +768,7 @@ ppb_cardbus_attach(parent, self, aux)
*
* XXX Don't pass-through Memory Read Multiple. Should we?
* XXX Consult the spec...
- */
- pba.pba_busname = "pci";
+ */
pba.pba_iot = ca->ca_iot;
pba.pba_memt = ca->ca_memt;
pba.pba_dmat = ca->ca_dmat;
@@ -780,7 +779,7 @@ ppb_cardbus_attach(parent, self, aux)
/*pba.pba_intrswiz = parent_sc->sc_intrswiz; */
pba.pba_intrtag = psc->sc_pa.pa_intrtag;
- config_found(self, &pba, rppbprint);
+ config_found_ia(self, "pcibus", &pba, rppbprint);
}
void
diff --git a/sys/dev/eisa/eisa.c b/sys/dev/eisa/eisa.c
index 5726cd44018..0bf59af1718 100644
--- a/sys/dev/eisa/eisa.c
+++ b/sys/dev/eisa/eisa.c
@@ -1,4 +1,4 @@
-/* $NetBSD: eisa.c,v 1.33 2004/08/23 05:50:02 thorpej Exp $ */
+/* $NetBSD: eisa.c,v 1.34 2004/08/30 15:05:19 drochner Exp $ */
/*
* Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: eisa.c,v 1.33 2004/08/23 05:50:02 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: eisa.c,v 1.34 2004/08/30 15:05:19 drochner Exp $");
#include "opt_eisaverbose.h"
@@ -66,11 +66,6 @@ static void eisa_devinfo(const char *, char *, size_t);
static int
eisamatch(struct device *parent, struct cfdata *cf, void *aux)
{
- struct eisabus_attach_args *eba = aux;
-
- if (strcmp(eba->eba_busname, cf->cf_name))
- return (0);
-
/* XXX check other indicators */
return (1);
diff --git a/sys/dev/eisa/eisavar.h b/sys/dev/eisa/eisavar.h
index cf08e27bb54..a958e5680b5 100644
--- a/sys/dev/eisa/eisavar.h
+++ b/sys/dev/eisa/eisavar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: eisavar.h,v 1.18 2004/08/30 10:30:38 drochner Exp $ */
+/* $NetBSD: eisavar.h,v 1.19 2004/08/30 15:05:19 drochner Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -102,7 +102,7 @@ typedef int eisa_slot_t; /* really only needs to be 4 bits */
* EISA bus attach arguments.
*/
struct eisabus_attach_args {
- const char *eba_busname; /* XXX should be common */
+ const char *_eba_busname; /* XXX placeholder */
bus_space_tag_t eba_iot; /* eisa i/o space tag */
bus_space_tag_t eba_memt; /* eisa mem space tag */
bus_dma_tag_t eba_dmat; /* DMA tag */
diff --git a/sys/dev/ic/cpc700.c b/sys/dev/ic/cpc700.c
index cb8b7d72123..a7091a95d9b 100644
--- a/sys/dev/ic/cpc700.c
+++ b/sys/dev/ic/cpc700.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cpc700.c,v 1.7 2003/11/07 17:06:42 augustss Exp $ */
+/* $NetBSD: cpc700.c,v 1.8 2004/08/30 15:05:19 drochner Exp $ */
/*
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpc700.c,v 1.7 2003/11/07 17:06:42 augustss Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpc700.c,v 1.8 2004/08/30 15:05:19 drochner Exp $");
#include "pci.h"
#include "opt_pci.h"
@@ -80,7 +80,6 @@ __KERNEL_RCSID(0, "$NetBSD: cpc700.c,v 1.7 2003/11/07 17:06:42 augustss Exp $");
#include <dev/ic/cpc700uic.h>
union attach_args {
- const char *busname; /* first elem of all */
struct pcibus_attach_args pba;
struct cpcbus_attach_args cba;
};
@@ -112,18 +111,8 @@ cpc_print(void *aux, const char *pnp)
}
static int
-cpcpci_print(void *aux, const char *pnp)
-{
- union attach_args *aa = aux;
-
- if (pnp)
- aprint_normal("%s at %s", aa->busname, pnp);
-
- return (UNCONF);
-}
-
-static int
-cpc_submatch(struct device *parent, struct cfdata *cf, void *aux)
+cpc_submatch(struct device *parent, struct cfdata *cf,
+ const locdesc_t *ldesc, void *aux)
{
struct cpcbus_attach_args *caa = aux;
@@ -182,12 +171,12 @@ cpc_attach(struct device *self, pci_chipset_tag_t pc, bus_space_tag_t mem,
aa.cba.cpca_name = devs[i].name;
aa.cba.cpca_addr = devs[i].addr;
aa.cba.cpca_irq = devs[i].irq;
- config_found_sm(self, &aa.cba, cpc_print, cpc_submatch);
+ config_found_sm_loc(self, "cpcbus", NULL, &aa.cba,
+ cpc_print, cpc_submatch);
}
tag = pci_make_tag(pc, 0, 0, 0);
- aa.pba.pba_busname = "pci";
aa.pba.pba_iot = pciio;
aa.pba.pba_memt = mem;
aa.pba.pba_dmat = dma;
@@ -219,7 +208,7 @@ cpc_attach(struct device *self, pci_chipset_tag_t pc, bus_space_tag_t mem,
extent_destroy(memext);
#endif
- config_found(self, &aa.pba, cpcpci_print);
+ config_found_ia(self, "pcibus", &aa.pba, pcibusprint);
/* Restore error triggers, and clear errors */
pci_conf_write(pc, tag, CPC_PCI_BRDGERR, erren | CPC_PCI_CLEARERR);
diff --git a/sys/dev/isa/isa.c b/sys/dev/isa/isa.c
index 942adefa750..a6561cafa11 100644
--- a/sys/dev/isa/isa.c
+++ b/sys/dev/isa/isa.c
@@ -1,4 +1,4 @@
-/* $NetBSD: isa.c,v 1.117 2004/08/18 11:54:47 drochner Exp $ */
+/* $NetBSD: isa.c,v 1.118 2004/08/30 15:05:19 drochner Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isa.c,v 1.117 2004/08/18 11:54:47 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isa.c,v 1.118 2004/08/30 15:05:19 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -77,11 +77,6 @@ int isasearch(struct device *, struct cfdata *, const locdesc_t *, void *);
int
isamatch(struct device *parent, struct cfdata *cf, void *aux)
{
- struct isabus_attach_args *iba = aux;
-
- if (strcmp(iba->iba_busname, cf->cf_name))
- return (0);
-
/* XXX check other indicators */
return (1);
diff --git a/sys/dev/isa/isavar.h b/sys/dev/isa/isavar.h
index 45c9d6b5ff3..b7dcbe58e77 100644
--- a/sys/dev/isa/isavar.h
+++ b/sys/dev/isa/isavar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: isavar.h,v 1.42 2004/08/30 10:30:38 drochner Exp $ */
+/* $NetBSD: isavar.h,v 1.43 2004/08/30 15:05:19 drochner Exp $ */
/*-
* Copyright (c) 1997, 2001 The NetBSD Foundation, Inc.
@@ -93,7 +93,7 @@ struct isabus_attach_args;
* ISA bus attach arguments
*/
struct isabus_attach_args {
- char *iba_busname; /* XXX should be common */
+ char *_iba_busname; /* XXX placeholder */
bus_space_tag_t iba_iot; /* isa i/o space tag */
bus_space_tag_t iba_memt; /* isa mem space tag */
bus_dma_tag_t iba_dmat; /* isa DMA tag */
diff --git a/sys/dev/marvell/gtpci.c b/sys/dev/marvell/gtpci.c
index 680d8ed8dcf..cc13c8c5d1d 100644
--- a/sys/dev/marvell/gtpci.c
+++ b/sys/dev/marvell/gtpci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gtpci.c,v 1.10 2003/07/14 15:47:17 lukem Exp $ */
+/* $NetBSD: gtpci.c,v 1.11 2004/08/30 15:05:19 drochner Exp $ */
/*
* Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gtpci.c,v 1.10 2003/07/14 15:47:17 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gtpci.c,v 1.11 2004/08/30 15:05:19 drochner Exp $");
#include "opt_marvell.h"
#include <sys/param.h>
@@ -307,7 +307,6 @@ gtpci_attach(struct device *parent, struct device *self, void *aux)
*/
pba.pba_pc = pc;
pba.pba_bus = 0;
- pba.pba_busname = "pci";
pba.pba_iot = gtpc->gtpc_io_bs;
pba.pba_memt = gtpc->gtpc_mem_bs;
pba.pba_dmat = gt->gt_dmat;
@@ -328,7 +327,7 @@ gtpci_attach(struct device *parent, struct device *self, void *aux)
/*
* Configure the pci bus.
*/
- config_found(self, &pba, gtpci_cfprint);
+ config_found_ia(self, "pcibus", &pba, gtpci_cfprint);
gt_watchdog_service();
diff --git a/sys/dev/mca/mca.c b/sys/dev/mca/mca.c
index 31dc5bf2ef7..98af97cb4bb 100644
--- a/sys/dev/mca/mca.c
+++ b/sys/dev/mca/mca.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mca.c,v 1.14 2004/04/22 00:17:12 itojun Exp $ */
+/* $NetBSD: mca.c,v 1.15 2004/08/30 15:05:19 drochner Exp $ */
/*-
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mca.c,v 1.14 2004/04/22 00:17:12 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mca.c,v 1.15 2004/08/30 15:05:19 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -71,9 +71,6 @@ mca_match(parent, cf, aux)
{
struct mcabus_attach_args *mba = aux;
- if (strcmp(mba->mba_busname, cf->cf_name))
- return (0);
-
/* sanity (only mca0 supported currently) */
if (mba->mba_bus < 0 || mba->mba_bus > 0)
return (0);
diff --git a/sys/dev/mca/mcavar.h b/sys/dev/mca/mcavar.h
index e46631faf1b..38e97236aa3 100644
--- a/sys/dev/mca/mcavar.h
+++ b/sys/dev/mca/mcavar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: mcavar.h,v 1.5 2004/08/30 10:30:38 drochner Exp $ */
+/* $NetBSD: mcavar.h,v 1.6 2004/08/30 15:05:19 drochner Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -52,7 +52,7 @@
#include <machine/mca_machdep.h>
struct mcabus_attach_args {
- const char *mba_busname;
+ const char *_mba_busname; /* XXX placeholder */
bus_space_tag_t mba_iot; /* MCA I/O space tag */
bus_space_tag_t mba_memt; /* MCA mem space tag */
bus_dma_tag_t mba_dmat; /* MCA DMA tag */
diff --git a/sys/dev/pci/agp.c b/sys/dev/pci/agp.c
index 45bb3bd3dff..ac88341affc 100644
--- a/sys/dev/pci/agp.c
+++ b/sys/dev/pci/agp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: agp.c,v 1.32 2004/02/13 11:36:22 wiz Exp $ */
+/* $NetBSD: agp.c,v 1.33 2004/08/30 15:05:19 drochner Exp $ */
/*-
* Copyright (c) 2000 Doug Rabson
@@ -65,7 +65,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.32 2004/02/13 11:36:22 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.33 2004/08/30 15:05:19 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -228,9 +228,6 @@ agpmatch(struct device *parent, struct cfdata *match, void *aux)
struct agpbus_attach_args *apa = aux;
struct pci_attach_args *pa = &apa->apa_pci_args;
- if (strcmp(apa->apa_busname, "agp") != 0)
- return (0);
-
if (agp_lookup(pa) == NULL)
return (0);
diff --git a/sys/dev/pci/agpvar.h b/sys/dev/pci/agpvar.h
index 14c13d69c93..a63352ca97a 100644
--- a/sys/dev/pci/agpvar.h
+++ b/sys/dev/pci/agpvar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: agpvar.h,v 1.7 2004/08/30 10:30:38 drochner Exp $ */
+/* $NetBSD: agpvar.h,v 1.8 2004/08/30 15:05:20 drochner Exp $ */
/*-
* Copyright (c) 2000 Doug Rabson
@@ -35,7 +35,7 @@
#include <sys/lock.h>
struct agpbus_attach_args {
- char *apa_busname;
+ char *_apa_busname; /* XXX placeholder */
struct pci_attach_args apa_pci_args;
};
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 2614b78bbc2..6d541704bd5 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pci.c,v 1.87 2004/08/17 23:20:10 drochner Exp $ */
+/* $NetBSD: pci.c,v 1.88 2004/08/30 15:05:20 drochner Exp $ */
/*
* Copyright (c) 1995, 1996, 1997, 1998
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.87 2004/08/17 23:20:10 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.88 2004/08/30 15:05:20 drochner Exp $");
#include "opt_pci.h"
@@ -111,9 +111,6 @@ pcimatch(parent, cf, aux)
{
struct pcibus_attach_args *pba = aux;
- if (strcmp(pba->pba_busname, cf->cf_name))
- return (0);
-
/* Check the locators */
if (cf->pcibuscf_bus != PCIBUS_UNK_BUS &&
cf->pcibuscf_bus != pba->pba_bus)
diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h
index 3dbd38b6f04..08df3cf212c 100644
--- a/sys/dev/pci/pcivar.h
+++ b/sys/dev/pci/pcivar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: pcivar.h,v 1.65 2004/08/30 10:30:38 drochner Exp $ */
+/* $NetBSD: pcivar.h,v 1.66 2004/08/30 15:05:20 drochner Exp $ */
/*
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
@@ -62,7 +62,7 @@ struct pci_softc;
* PCI bus attach arguments.
*/
struct pcibus_attach_args {
- char *pba_busname; /* XXX should be common */
+ char *_pba_busname; /* XXX placeholder */
bus_space_tag_t pba_iot; /* pci i/o space tag */
bus_space_tag_t pba_memt; /* pci mem space tag */
bus_dma_tag_t pba_dmat; /* DMA tag */
diff --git a/sys/dev/pci/ppb.c b/sys/dev/pci/ppb.c
index 317dd6a8776..ae08214214a 100644
--- a/sys/dev/pci/ppb.c
+++ b/sys/dev/pci/ppb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ppb.c,v 1.28 2004/04/23 21:13:07 itojun Exp $ */
+/* $NetBSD: ppb.c,v 1.29 2004/08/30 15:05:20 drochner Exp $ */
/*
* Copyright (c) 1996, 1998 Christopher G. Demetriou. All rights reserved.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ppb.c,v 1.28 2004/04/23 21:13:07 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ppb.c,v 1.29 2004/08/30 15:05:20 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -54,8 +54,6 @@ void ppbattach __P((struct device *, struct device *, void *));
CFATTACH_DECL(ppb, sizeof(struct ppb_softc),
ppbmatch, ppbattach, NULL, NULL);
-int ppbprint __P((void *, const char *pnp));
-
int
ppbmatch(parent, match, aux)
struct device *parent;
@@ -122,7 +120,6 @@ ppbattach(parent, self, aux)
* XXX Don't pass-through Memory Read Multiple. Should we?
* XXX Consult the spec...
*/
- pba.pba_busname = "pci"; /* XXX should be pci_ppb attachment */
pba.pba_iot = pa->pa_iot;
pba.pba_memt = pa->pa_memt;
pba.pba_dmat = pa->pa_dmat;
@@ -134,19 +131,5 @@ ppbattach(parent, self, aux)
pba.pba_intrswiz = pa->pa_intrswiz;
pba.pba_intrtag = pa->pa_intrtag;
- config_found(self, &pba, ppbprint);
-}
-
-int
-ppbprint(aux, pnp)
- void *aux;
- const char *pnp;
-{
- struct pcibus_attach_args *pba = aux;
-
- /* only PCIs can attach to PPBs; easy. */
- if (pnp)
- aprint_normal("pci at %s", pnp);
- aprint_normal(" bus %d", pba->pba_bus);
- return (UNCONF);
+ config_found_ia(self, "pcibus", &pba, pcibusprint);
}