From 855b8983319f24835e72669469669f270fffa1db Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Sat, 13 Nov 2021 17:56:20 +1100 Subject: pcidev: Move pci_card_find() from internal to canonical place Also rename to `pcidev_card_find()` in fitting with pcidev.c helpers. BUG=b:220950271 TEST=```sudo ./flashrom -p internal -r /tmp/bios Found Programmer flash chip "Opaque flash chip" (16384 kB, Programmer-specific) mapped at physical address 0x0000000000000000. Reading flash... done. ``` Change-Id: I026bfbecba114411728d4ad1ed8969b469fa7d2d Signed-off-by: Edward O'Callaghan Reviewed-on: https://review.coreboot.org/c/flashrom/+/59279 Tested-by: build bot (Jenkins) Reviewed-by: Thomas Heijligen Reviewed-by: Nikolai Artemiev Reviewed-by: Anastasia Klimchuk --- programmer.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'programmer.h') diff --git a/programmer.h b/programmer.h index 6a0c3fa0d..50753cf44 100644 --- a/programmer.h +++ b/programmer.h @@ -128,6 +128,7 @@ struct pci_dev *pcidev_init(const struct dev_entry *devs, int bar); struct pci_dev *pcidev_scandev(struct pci_filter *filter, struct pci_dev *start); struct pci_dev *pcidev_getdevfn(struct pci_dev *dev, const int func); struct pci_dev *pcidev_find_vendorclass(uint16_t vendor, uint16_t devclass); +struct pci_dev *pcidev_card_find(uint16_t vendor, uint16_t device, uint16_t card_vendor, uint16_t card_device); /* rpci_write_* are reversible writes. The original PCI config space register * contents will be restored on shutdown. * To clone the pci_dev instances internally, the `pacc` global @@ -262,8 +263,6 @@ extern int superio_count; #endif #if NEED_PCI == 1 struct pci_dev *pci_dev_find(uint16_t vendor, uint16_t device); -struct pci_dev *pci_card_find(uint16_t vendor, uint16_t device, - uint16_t card_vendor, uint16_t card_device); #endif #if CONFIG_INTERNAL == 1 extern int is_laptop; -- cgit v1.2.3