diff options
author | Gavin Shan <gwshan@linux.vnet.ibm.com> | 2016-04-26 11:56:53 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-05-03 17:54:43 +1000 |
commit | 0d4d3355e00e5beee08123d6db6e08aa3d9e47c8 (patch) | |
tree | d41385ac7c927d0be5ca19718468a98676a401eb /include/pci.h | |
parent | 00f3d2ca92b325db1c7832e4560b564359977202 (diff) | |
download | skiboot-0d4d3355e00e5beee08123d6db6e08aa3d9e47c8.zip skiboot-0d4d3355e00e5beee08123d6db6e08aa3d9e47c8.tar.gz skiboot-0d4d3355e00e5beee08123d6db6e08aa3d9e47c8.tar.bz2 |
PCI: Introduce phb_ops->phb_final_fixup()
phb_ops->device_node_fixup() was introduced for NPU1 so that the
chip backend can bind the emulated NPU device with the GPU device
and fixes the device-tree node accordingly. There're couple of
issues as I can image:
* In pci_fixup_nodes(), one PHB has only one level of device
depth in the hierarchy tree. It's true for NPU PHBs, but
false for other PHBs. That indicates the function can be
called for NPU PHBs.
* The callback name indicates the specific work to be done
there. That doesn't make sense. We need another name without
indicating the specific work to do. It will give the backend
on chip level more freedom. Similarly, the callback is called
on basis of PCI device. It's hard for backend to manuplate
the PHB. More freedom the backend will get with more bold
granularity.
This fixes above issues by replacing phb_ops->device_node_fixup()
with phb_ops->phb_final_fixup(). More freedom will be received in
the backends.
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include/pci.h')
-rw-r--r-- | include/pci.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/include/pci.h b/include/pci.h index b9e6ac6..3541374 100644 --- a/include/pci.h +++ b/include/pci.h @@ -262,11 +262,8 @@ struct phb_ops { */ void (*device_init)(struct phb *phb, struct pci_device *device); - /* - * Device node fixup is called when the PCI device node is being - * populated - */ - void (*device_node_fixup)(struct phb *phb, struct pci_device *pd); + /* PHB final fixup is called after PCI probing is completed */ + void (*phb_final_fixup)(struct phb *phb); /* * EEH methods |