summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
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/powerpc
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/powerpc')
-rw-r--r--sys/powerpc/ofw/ofw_pcib_pci.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sys/powerpc/ofw/ofw_pcib_pci.c b/sys/powerpc/ofw/ofw_pcib_pci.c
index 823f7c9..8a5c81f 100644
--- a/sys/powerpc/ofw/ofw_pcib_pci.c
+++ b/sys/powerpc/ofw/ofw_pcib_pci.c
@@ -114,10 +114,7 @@ ofw_pcib_pci_attach(device_t dev)
sizeof(cell_t));
pcib_attach_common(dev);
-
- device_add_child(dev, "pci", -1);
-
- return (bus_generic_attach(dev));
+ return (pcib_attach_child(dev));
}
static phandle_t
OpenPOWER on IntegriCloud