Add a "firstbus" argument to pci_configure_bus(), indicating the

first bus number to use, rather than always assuming that we should
start at bus #0.
This commit is contained in:
thorpej 2001-11-09 19:29:12 +00:00
parent c89e803d30
commit b1ec255377
8 changed files with 17 additions and 17 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: mainbus.c,v 1.5 2001/10/20 13:47:09 simonb Exp $ */
/* $NetBSD: mainbus.c,v 1.6 2001/11/09 19:29:12 thorpej Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -196,7 +196,7 @@ mainbus_attach(struct device *parent, struct device *self, void *aux)
#endif
#endif /* ALGOR_P4032 || ALGOR_P5064 || ALGOR_P6032 */
pci_configure_bus(pc, ioext, memext, NULL);
pci_configure_bus(pc, ioext, memext, NULL, 0);
extent_destroy(ioext);
extent_destroy(memext);

View File

@ -1,4 +1,4 @@
/* $NetBSD: mainbus.c,v 1.8 2001/08/26 02:47:35 matt Exp $ */
/* $NetBSD: mainbus.c,v 1.9 2001/11/09 19:29:12 thorpej Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@ -102,7 +102,7 @@ mainbus_attach(struct device *parent, struct device *self, void *aux)
NULL, 0, EX_NOWAIT);
memext = extent_create("pcimem", 0x00000000, 0x0fffffff, M_DEVBUF,
NULL, 0, EX_NOWAIT);
pci_configure_bus(0, ioext, memext, NULL);
pci_configure_bus(0, ioext, memext, NULL, 0);
extent_destroy(ioext);
extent_destroy(memext);
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: ifpga.c,v 1.1 2001/10/27 16:19:08 rearnsha Exp $ */
/* $NetBSD: ifpga.c,v 1.2 2001/11/09 19:29:12 thorpej Exp $ */
/*
* Copyright (c) 2001 ARM Ltd
@ -319,7 +319,7 @@ ifpga_attach(struct device *parent, struct device *self, void *aux)
IFPGA_PCI_APP1_BASE + IFPGA_PCI_APP1_SIZE,
M_DEVBUF, NULL, 0, EX_NOWAIT);
ifpga_pci_chipset.pc_conf_v = (void *)pci_sc;
pci_configure_bus(&ifpga_pci_chipset, ioext, memext, pmemext);
pci_configure_bus(&ifpga_pci_chipset, ioext, memext, pmemext, 0);
extent_destroy(pmemext);
extent_destroy(memext);
extent_destroy(ioext);

View File

@ -1,4 +1,4 @@
/* $NetBSD: mainbus.c,v 1.4 2001/06/20 14:35:26 nonaka Exp $ */
/* $NetBSD: mainbus.c,v 1.5 2001/11/09 19:29:13 thorpej Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@ -108,7 +108,7 @@ mainbus_attach(parent, self, aux)
memext = extent_create("pcimem", 0x00000000, 0x0fffffff, M_DEVBUF,
NULL, 0, EX_NOWAIT);
pci_configure_bus(0, ioext, memext, NULL);
pci_configure_bus(0, ioext, memext, NULL, 0);
extent_destroy(ioext);
extent_destroy(memext);

View File

@ -1,4 +1,4 @@
/* $NetBSD: mainbus.c,v 1.5 2001/08/26 02:47:38 matt Exp $ */
/* $NetBSD: mainbus.c,v 1.6 2001/11/09 19:29:13 thorpej Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@ -110,7 +110,7 @@ mainbus_attach(parent, self, aux)
memext = extent_create("pcimem", 0x80000000, 0x8fffffff, M_DEVBUF,
NULL, 0, EX_NOWAIT);
pci_configure_bus(0, ioext, memext, NULL);
pci_configure_bus(0, ioext, memext, NULL, 0);
extent_destroy(ioext);
extent_destroy(memext);

View File

@ -1,4 +1,4 @@
/* $NetBSD: mainbus.c,v 1.6 2001/11/08 23:28:15 eeh Exp $ */
/* $NetBSD: mainbus.c,v 1.7 2001/11/09 19:29:13 thorpej Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@ -227,7 +227,7 @@ mainbus_attach(struct device *parent, struct device *self, void *aux)
EX_NOWAIT);
ioext = extent_create("pciio", MIN_PCI_PCI_IOADDR,
MIN_PCI_PCI_IOADDR + 0xffff, M_DEVBUF, NULL, 0, EX_NOWAIT);
pci_configure_bus(0, ioext, memext, NULL);
pci_configure_bus(0, ioext, memext, NULL, 0);
extent_destroy(memext);
#endif /* PCI_NETBSD_CONFIGURE */

View File

@ -1,4 +1,4 @@
/* $NetBSD: pciconf.c,v 1.11 2001/11/09 19:20:19 thorpej Exp $ */
/* $NetBSD: pciconf.c,v 1.12 2001/11/09 19:29:12 thorpej Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@ -1022,13 +1022,13 @@ configure_bus(pciconf_bus_t *pb)
*/
int
pci_configure_bus(pci_chipset_tag_t pc, struct extent *ioext,
struct extent *memext, struct extent *pmemext)
struct extent *memext, struct extent *pmemext, int firstbus)
{
pciconf_bus_t *pb;
int rv;
pb = malloc (sizeof (pciconf_bus_t), M_DEVBUF, M_NOWAIT);
pb->busno = 0;
pb->busno = firstbus;
pb->busno_spacing = PCI_BUSNO_SPACING;
pb->next_busno = pb->busno + 1;
pb->last_busno = 255;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pciconf.h,v 1.3 2001/08/30 02:52:41 briggs Exp $ */
/* $NetBSD: pciconf.h,v 1.4 2001/11/09 19:29:12 thorpej Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@ -41,7 +41,7 @@
* be used for both
*/
int pci_configure_bus __P((pci_chipset_tag_t, struct extent *,
struct extent *, struct extent *));
struct extent *, struct extent *, int));
/* Defined in machdep code. Returns the interrupt line to set */
/* args: chipset_tag, bus, dev, ipin, ptr to interrupt line */