aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKlaus Heinrich Kiwi <klaus@linux.vnet.ibm.com>2020-02-18 08:37:30 -0300
committerOliver O'Halloran <oohall@gmail.com>2020-02-24 12:56:03 +1100
commitab1b05d29f5e9715a754a68bcb565e29cee0e48a (patch)
tree5296370f84bd26d792ec8cdf50b61c28ed538121 /include
parent59482b92af1b7cc1a75d39b64a956ef6ae08b538 (diff)
downloadskiboot-ab1b05d29f5e9715a754a68bcb565e29cee0e48a.zip
skiboot-ab1b05d29f5e9715a754a68bcb565e29cee0e48a.tar.gz
skiboot-ab1b05d29f5e9715a754a68bcb565e29cee0e48a.tar.bz2
PCI: create optional loc-code platform callback
Some platforms (mostly OpenPower-based) will favor a short, slot-label-based string for the "ibm,loc-code" DT property. Other platforms such as ZZ/FSP-based platforms will prefer the fully-qualified slot-location-code for it. This patches creates a new operation on the platform struct, allowing for an optional callback to create the "ibm,loc-code" property in a platform-specific way. If the callback is not defined, use the cleaned-up default that was in use so far. Signed-off-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/platform.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/platform.h b/include/platform.h
index 6909a6a..671878b 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -186,6 +186,14 @@ struct platform {
struct pci_device *pd);
/*
+ * Called for each device during pci_add_device_nodes() descend
+ * to create the device tree, in order to get the correct per-platform
+ * preference for the ibm,loc-code property
+ */
+ void (*pci_add_loc_code)(struct dt_node *np,
+ struct pci_device *pd);
+
+ /*
* Called after PCI probe is complete and before inventory is
* displayed in console. This can either run platform fixups or
* can be used to send the inventory to a service processor.