mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-01 22:21:16 +02:00
pcidev: Move scandev_inclass logic from internal to pcidev
BUG=b:220950271 TEST=```sudo ./flashrom -p internal -r /tmp/bios <snip> Found Programmer flash chip "Opaque flash chip" (16384 kB, Programmer-specific) mapped at physical address 0x0000000000000000. Reading flash... done. ``` Change-Id: I1978e178fb73485f1c5c7e732853522847267cee Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/59277 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
This commit is contained in:

committed by
Edward O'Callaghan

parent
bc2e3b6b79
commit
6289508c5b
19
internal.c
19
internal.c
@ -34,25 +34,6 @@ int force_boardmismatch = 0;
|
||||
|
||||
enum chipbustype internal_buses_supported = BUS_NONE;
|
||||
|
||||
struct pci_dev *pci_dev_find_vendorclass(uint16_t vendor, uint16_t devclass)
|
||||
{
|
||||
struct pci_dev *temp = NULL;
|
||||
struct pci_filter filter;
|
||||
uint16_t tmp2;
|
||||
|
||||
pci_filter_init(NULL, &filter);
|
||||
filter.vendor = vendor;
|
||||
|
||||
while ((temp = pcidev_scandev(&filter, temp))) {
|
||||
/* Read PCI class */
|
||||
tmp2 = pci_read_word(temp, 0x0a);
|
||||
if (tmp2 == devclass)
|
||||
return temp;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct pci_dev *pci_dev_find(uint16_t vendor, uint16_t device)
|
||||
{
|
||||
struct pci_filter filter;
|
||||
|
Reference in New Issue
Block a user