summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2016-04-27 16:39:05 +0000
committerjhb <jhb@FreeBSD.org>2016-04-27 16:39:05 +0000
commit4a26c9bbdf73e90e480ac36d601cd327f8cf76f0 (patch)
treea142f6a2e1963024e2461948295502e9668253cd /sys/sparc64
parentaf967cc0f01234519d07002e8ad79826aafac3d1 (diff)
downloadFreeBSD-src-4a26c9bbdf73e90e480ac36d601cd327f8cf76f0.zip
FreeBSD-src-4a26c9bbdf73e90e480ac36d601cd327f8cf76f0.tar.gz
Add a pcib_attach_child() method to manage adding the child "pci" device.
This allows the PCI-PCI bridge driver to save a reference to the child device in its softc. Note that this required moving the "pci" device creation out of acpi_pcib_attach(). Instead, acpi_pcib_attach() is renamed to acpi_pcib_fetch_prt() as it's sole action now is to fetch the PCI interrupt routing table. Differential Revision: https://reviews.freebsd.org/D6021
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/pci/ofw_pcib.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/sparc64/pci/ofw_pcib.c b/sys/sparc64/pci/ofw_pcib.c
index 7944237..77c2c35 100644
--- a/sys/sparc64/pci/ofw_pcib.c
+++ b/sys/sparc64/pci/ofw_pcib.c
@@ -149,8 +149,7 @@ ofw_pcib_attach(device_t dev)
ofw_pcib_gen_setup(dev);
pcib_attach_common(dev);
- device_add_child(dev, "pci", -1);
- return (bus_generic_attach(dev));
+ return (pcib_attach_child(dev));
}
static void
OpenPOWER on IntegriCloud