From b1ec25537755af7eb5f0df53551b64eb77d839dd Mon Sep 17 00:00:00 2001 From: thorpej Date: Fri, 9 Nov 2001 19:29:12 +0000 Subject: [PATCH] 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. --- sys/arch/algor/dev/mainbus.c | 4 ++-- sys/arch/bebox/bebox/mainbus.c | 4 ++-- sys/arch/evbarm/ifpga/ifpga.c | 4 ++-- sys/arch/prep/prep/mainbus.c | 4 ++-- sys/arch/sandpoint/sandpoint/mainbus.c | 4 ++-- sys/arch/walnut/walnut/mainbus.c | 4 ++-- sys/dev/pci/pciconf.c | 6 +++--- sys/dev/pci/pciconf.h | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/sys/arch/algor/dev/mainbus.c b/sys/arch/algor/dev/mainbus.c index 55e3d3a666d7..38a56d2f9c3f 100644 --- a/sys/arch/algor/dev/mainbus.c +++ b/sys/arch/algor/dev/mainbus.c @@ -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); diff --git a/sys/arch/bebox/bebox/mainbus.c b/sys/arch/bebox/bebox/mainbus.c index 4baf9abcf284..7df462b43a7a 100644 --- a/sys/arch/bebox/bebox/mainbus.c +++ b/sys/arch/bebox/bebox/mainbus.c @@ -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 diff --git a/sys/arch/evbarm/ifpga/ifpga.c b/sys/arch/evbarm/ifpga/ifpga.c index 4bd9563505cf..985321e76d5e 100644 --- a/sys/arch/evbarm/ifpga/ifpga.c +++ b/sys/arch/evbarm/ifpga/ifpga.c @@ -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); diff --git a/sys/arch/prep/prep/mainbus.c b/sys/arch/prep/prep/mainbus.c index 9d044fbb0f15..d60c0c57b33a 100644 --- a/sys/arch/prep/prep/mainbus.c +++ b/sys/arch/prep/prep/mainbus.c @@ -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); diff --git a/sys/arch/sandpoint/sandpoint/mainbus.c b/sys/arch/sandpoint/sandpoint/mainbus.c index 7e6c84e98e8a..8a16e89160e8 100644 --- a/sys/arch/sandpoint/sandpoint/mainbus.c +++ b/sys/arch/sandpoint/sandpoint/mainbus.c @@ -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); diff --git a/sys/arch/walnut/walnut/mainbus.c b/sys/arch/walnut/walnut/mainbus.c index 88d300083600..b65974727502 100644 --- a/sys/arch/walnut/walnut/mainbus.c +++ b/sys/arch/walnut/walnut/mainbus.c @@ -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 */ diff --git a/sys/dev/pci/pciconf.c b/sys/dev/pci/pciconf.c index 8b6a0444060d..7c56108f3ce8 100644 --- a/sys/dev/pci/pciconf.c +++ b/sys/dev/pci/pciconf.c @@ -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; diff --git a/sys/dev/pci/pciconf.h b/sys/dev/pci/pciconf.h index 415e692586c3..193d2373ab43 100644 --- a/sys/dev/pci/pciconf.h +++ b/sys/dev/pci/pciconf.h @@ -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 */