diff options
author | kmacy <kmacy@FreeBSD.org> | 2006-10-12 04:44:01 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2006-10-12 04:44:01 +0000 |
commit | f64ee1a32f0c0053cd991dd2e771a5925a41a3a2 (patch) | |
tree | 070cd77df2f88a3642faad083d9c58698c40c7a2 /sys/sparc64/pci | |
parent | e728d447453104c4d242dc342a1e96716657cad7 (diff) | |
download | FreeBSD-src-f64ee1a32f0c0053cd991dd2e771a5925a41a3a2.zip FreeBSD-src-f64ee1a32f0c0053cd991dd2e771a5925a41a3a2.tar.gz |
The T2000 has multiple PCI domains requiring bus allocation to be done differently.
This pulls in changes by jmg from perforce and makes them sun4v only for now.
Approved by: scottl (acting as backup for mentor rwatson)
Diffstat (limited to 'sys/sparc64/pci')
-rw-r--r-- | sys/sparc64/pci/ofw_pcib.c | 6 | ||||
-rw-r--r-- | sys/sparc64/pci/ofw_pcib_subr.c | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/sys/sparc64/pci/ofw_pcib.c b/sys/sparc64/pci/ofw_pcib.c index d4e627d..9d20486 100644 --- a/sys/sparc64/pci/ofw_pcib.c +++ b/sys/sparc64/pci/ofw_pcib.c @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ofw_pci.h" +#include "opt_global.h" #include <sys/param.h> #include <sys/kernel.h> @@ -119,6 +120,11 @@ ofw_pcib_attach(device_t dev) sc = device_get_softc(dev); ofw_pcib_gen_setup(dev); pcib_attach_common(dev); +#ifdef SUN4V + device_add_child(dev, "pci", -1); +#else device_add_child(dev, "pci", sc->ops_pcib_sc.secbus); +#endif + return (bus_generic_attach(dev)); } diff --git a/sys/sparc64/pci/ofw_pcib_subr.c b/sys/sparc64/pci/ofw_pcib_subr.c index 6e9620e..834ebe3 100644 --- a/sys/sparc64/pci/ofw_pcib_subr.c +++ b/sys/sparc64/pci/ofw_pcib_subr.c @@ -27,6 +27,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ofw_pci.h" +#include "opt_global.h" #include <sys/param.h> #include <sys/systm.h> @@ -52,8 +53,10 @@ void ofw_pcib_gen_setup(device_t bridge) { struct ofw_pcib_gen_softc *sc; +#ifndef SUN4V u_int secbus; +#endif sc = device_get_softc(bridge); sc->ops_pcib_sc.dev = bridge; sc->ops_node = ofw_bus_get_node(bridge); @@ -65,6 +68,7 @@ ofw_pcib_gen_setup(device_t bridge) * bus number for it; the firmware preset does not always seem to be * correct. */ +#ifndef SUN4V secbus = ofw_pci_alloc_busno(sc->ops_node); pci_write_config(bridge, PCIR_PRIBUS_1, pci_get_bus(bridge), 1); pci_write_config(bridge, PCIR_SECBUS_1, secbus, 1); @@ -73,6 +77,7 @@ ofw_pcib_gen_setup(device_t bridge) /* Notify parent bridges. */ OFW_PCI_ADJUST_BUSRANGE(device_get_parent(bridge), secbus); +#endif ofw_bus_setup_iinfo(sc->ops_node, &sc->ops_iinfo, sizeof(ofw_pci_intr_t)); } |