aboutsummaryrefslogtreecommitdiff
path: root/hw/npu.c
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2016-06-10 15:03:39 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-06-14 16:00:16 +1000
commit72552138f07fb29dd7f4ceb0831f492e71b060d0 (patch)
tree282ccf20c07c2f41224c7363514e02ca73c4dc22 /hw/npu.c
parent306b47d08a7520a08acdbbe06bcb1668eaf4b42c (diff)
downloadskiboot-72552138f07fb29dd7f4ceb0831f492e71b060d0.zip
skiboot-72552138f07fb29dd7f4ceb0831f492e71b060d0.tar.gz
skiboot-72552138f07fb29dd7f4ceb0831f492e71b060d0.tar.bz2
core/pci: Extend pci_walk_dev() for PCI slot
Currently, pci_walk_dev() iterates all PCI devices behind the specified PHB. This extends the function to allow iteration on PCI devices behind the specified PCI slot so that it can be used by PCI hotplug logic in the subsequent patches. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/npu.c')
-rw-r--r--hw/npu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/npu.c b/hw/npu.c
index a8f9f06..f57d34d 100644
--- a/hw/npu.c
+++ b/hw/npu.c
@@ -541,7 +541,7 @@ static void npu_dev_bind_pci_dev(struct npu_dev *dev)
if (!phb)
continue;
- dev->pd = pci_walk_dev(phb, __npu_dev_bind_pci_dev, dev);
+ dev->pd = pci_walk_dev(phb, NULL, __npu_dev_bind_pci_dev, dev);
if (dev->pd) {
dev->phb = phb;
/* Found the device, set the bit in config space */
@@ -618,7 +618,7 @@ static int npu_dn_fixup(struct phb *phb,
static void npu_phb_final_fixup(struct phb *phb)
{
- pci_walk_dev(phb, npu_dn_fixup, NULL);
+ pci_walk_dev(phb, NULL, npu_dn_fixup, NULL);
}
static void npu_ioda_init(struct npu *p)