ofw_pcibus.c (152684) | ofw_pcibus.c (153057) |
---|---|
1/*- 2 * Copyright (c) 1997, Stefan Esser <se@freebsd.org> 3 * Copyright (c) 2000, Michael Smith <msmith@freebsd.org> 4 * Copyright (c) 2000, BSDi 5 * Copyright (c) 2003, Thomas Moestl <tmm@FreeBSD.org> 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 14 unchanged lines hidden (view full) --- 23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1997, Stefan Esser <se@freebsd.org> 3 * Copyright (c) 2000, Michael Smith <msmith@freebsd.org> 4 * Copyright (c) 2000, BSDi 5 * Copyright (c) 2003, Thomas Moestl <tmm@FreeBSD.org> 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 14 unchanged lines hidden (view full) --- 23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sys/sparc64/pci/ofw_pcibus.c 152684 2005-11-22 16:39:44Z marius $"); | 31__FBSDID("$FreeBSD: head/sys/sparc64/pci/ofw_pcibus.c 153057 2005-12-03 18:11:26Z marius $"); |
32 33#include "opt_ofw_pci.h" 34 35#include <sys/param.h> 36#include <sys/bus.h> 37#include <sys/kernel.h> 38#include <sys/libkern.h> 39#include <sys/module.h> --- 155 unchanged lines hidden (view full) --- 195 */ 196 PCIB_WRITE_CONFIG(bridge, busno, slot, func, PCIR_INTLINE, 197 PCI_INVALID_IRQ, 1); 198} 199 200static int 201ofw_pcibus_attach(device_t dev) 202{ | 32 33#include "opt_ofw_pci.h" 34 35#include <sys/param.h> 36#include <sys/bus.h> 37#include <sys/kernel.h> 38#include <sys/libkern.h> 39#include <sys/module.h> --- 155 unchanged lines hidden (view full) --- 195 */ 196 PCIB_WRITE_CONFIG(bridge, busno, slot, func, PCIR_INTLINE, 197 PCI_INVALID_IRQ, 1); 198} 199 200static int 201ofw_pcibus_attach(device_t dev) 202{ |
203 device_t pcib = device_get_parent(dev); | 203 device_t pcib; |
204 struct ofw_pci_register pcir; 205 struct ofw_pcibus_devinfo *dinfo; 206 phandle_t node, child; 207 u_int slot, busno, func; 208 | 204 struct ofw_pci_register pcir; 205 struct ofw_pcibus_devinfo *dinfo; 206 phandle_t node, child; 207 u_int slot, busno, func; 208 |
209 pcib = device_get_parent(dev); 210 |
|
209 /* 210 * Ask the bridge for the bus number - in some cases, we need to 211 * renumber buses, so the firmware information cannot be trusted. 212 */ 213 busno = pcib_get_bus(dev); 214 if (bootverbose) 215 device_printf(dev, "physical bus=%d\n", busno); 216 --- 60 unchanged lines hidden --- | 211 /* 212 * Ask the bridge for the bus number - in some cases, we need to 213 * renumber buses, so the firmware information cannot be trusted. 214 */ 215 busno = pcib_get_bus(dev); 216 if (bootverbose) 217 device_printf(dev, "physical bus=%d\n", busno); 218 --- 60 unchanged lines hidden --- |