aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2017-04-07 10:16:17 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-06-15 17:10:11 +1000
commit2b841bf0ef1b20d9544ffe641d6271b65b9efcc4 (patch)
treeed8dd65aaefb81a64fa3c5b5276ce08e3640b0c3 /include
parente835c2fb7ce1e9bff7ca5948c1343037e906395f (diff)
downloadskiboot-2b841bf0ef1b20d9544ffe641d6271b65b9efcc4.zip
skiboot-2b841bf0ef1b20d9544ffe641d6271b65b9efcc4.tar.gz
skiboot-2b841bf0ef1b20d9544ffe641d6271b65b9efcc4.tar.bz2
core/pci: Use cached vendor/device IDs in quirks
The PCI device vendor/device IDs have been cached to pd->vdid, no need to pass them in pci_handle_quirk(). This also introduces two macros to extract vendor/device fields and they are useful afterwards. No logical changes introduced. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/pci-quirk.h5
-rw-r--r--include/pci.h2
2 files changed, 3 insertions, 4 deletions
diff --git a/include/pci-quirk.h b/include/pci-quirk.h
index c766973..1883248 100644
--- a/include/pci-quirk.h
+++ b/include/pci-quirk.h
@@ -27,9 +27,6 @@ struct pci_quirk {
uint16_t device_id;
};
-void pci_handle_quirk(struct phb *phb,
- struct pci_device *pd,
- uint16_t vendor_id,
- uint16_t device_id);
+void pci_handle_quirk(struct phb *phb, struct pci_device *pd);
#endif /* __PCI_QUIRK_H */
diff --git a/include/pci.h b/include/pci.h
index 0aea56c..f216594 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -73,6 +73,8 @@ struct pci_device {
uint32_t vdid;
uint32_t sub_vdid;
+#define PCI_VENDOR_ID(x) ((x) & 0xFFFF)
+#define PCI_DEVICE_ID(x) ((x) >> 8)
uint32_t class;
uint64_t cap_list;
struct {