summaryrefslogtreecommitdiff
path: root/src/include/device
diff options
context:
space:
mode:
authorBill XIE <persmule@hardenedlinux.org>2022-08-02 22:55:51 +0800
committerMartin L Roth <gaumless@gmail.com>2022-08-07 19:41:38 +0000
commit513d359dad3a99c13846f4e97b372ec98d245695 (patch)
tree7cbd42b71dde4c9908bd69058e816bd685f9beab /src/include/device
parenta43380e3d5637b5d2e23b001a5c2519696a21c5d (diff)
pci_device: Add a function to find PCI capability ID recursively
Some PCI capabilities should only be enabled if it is available not only on a device, but also all bridge upstream of it. Checking only the device and the bridge just above it may not be enough. Signed-off-by: Bill XIE <persmule@hardenedlinux.org> Change-Id: I1237d3b4b86dd0ae5eb586e3c3c407362e6ca291 Reviewed-on: https://review.coreboot.org/c/coreboot/+/66383 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/include/device')
-rw-r--r--src/include/device/pci.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/device/pci.h b/src/include/device/pci.h
index f2e250631e..f28f319d8c 100644
--- a/src/include/device/pci.h
+++ b/src/include/device/pci.h
@@ -97,6 +97,7 @@ void pci_dev_set_subsystem(struct device *dev, unsigned int vendor,
unsigned int device);
void pci_dev_init(struct device *dev);
unsigned int pci_match_simple_dev(struct device *dev, pci_devfn_t sdev);
+uint16_t pci_find_cap_recursive(const struct device *dev, uint16_t cap);
const char *pin_to_str(int pin);
int get_pci_irq_pins(struct device *dev, struct device **parent_bdg);