Edward O'Callaghan has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/59282 )
Change subject: pcidev.c: Rename pci_dev_find() -> pcidev_find() ......................................................................
pcidev.c: Rename pci_dev_find() -> pcidev_find()
Make symbol name consistent with the rest in pcidev.c
BUG=none TEST=builds
Change-Id: I41e0922d5429b4389367dd98b4241d50b8013183 Signed-off-by: Edward O'Callaghan quasisec@google.com --- M board_enable.c M chipset_enable.c M pcidev.c M programmer.h M sb600spi.c 5 files changed, 23 insertions(+), 23 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/82/59282/1
diff --git a/board_enable.c b/board_enable.c index b86cfe6..a3a8b01 100644 --- a/board_enable.c +++ b/board_enable.c @@ -889,7 +889,7 @@ uint16_t smbba; uint8_t b;
- dev = pci_dev_find(0x8086, 0x7113); /* Intel PIIX4, PM/SMBus function. */ + dev = pcidev_find(0x8086, 0x7113); /* Intel PIIX4, PM/SMBus function. */ if (!dev) { msg_perr("\nERROR: Intel PIIX4 PM not found.\n"); return -1; @@ -1041,7 +1041,7 @@ struct pci_dev *dev; uint32_t tmp;
- dev = pci_dev_find(0x10DE, 0x03EB); /* NVIDIA MCP61 SMBus. */ + dev = pcidev_find(0x10DE, 0x03EB); /* NVIDIA MCP61 SMBus. */ if (!dev) { msg_perr("\nERROR: NVIDIA MCP61 SMBus not found.\n"); return -1; @@ -1269,7 +1269,7 @@ if (ret) return ret;
- dev = pci_dev_find(0x10de, 0x0364); /* NVIDIA MCP55 LPC bridge */ + dev = pcidev_find(0x10de, 0x0364); /* NVIDIA MCP55 LPC bridge */ if (!dev) { msg_perr("\nERROR: NVIDIA MCP55 LPC bridge not found.\n"); return -1; @@ -1339,7 +1339,7 @@ struct pci_dev *dev; uint32_t reg;
- dev = pci_dev_find(0x1002, 0x4372); /* AMD SMBus controller */ + dev = pcidev_find(0x1002, 0x4372); /* AMD SMBus controller */ if (!dev) { msg_perr("\nERROR: AMD SMBus Controller (0x4372) not found.\n"); return -1; @@ -1403,7 +1403,7 @@ {0} };
- dev = pci_dev_find(0x8086, 0x7110); /* Intel PIIX4 ISA bridge */ + dev = pcidev_find(0x8086, 0x7110); /* Intel PIIX4 ISA bridge */ if (!dev) { msg_perr("\nERROR: Intel PIIX4 ISA bridge not found.\n"); return -1; @@ -1422,7 +1422,7 @@ return -1; }
- dev = pci_dev_find(0x8086, 0x7113); /* Intel PIIX4 PM */ + dev = pcidev_find(0x8086, 0x7113); /* Intel PIIX4 PM */ if (!dev) { msg_perr("\nERROR: Intel PIIX4 PM not found.\n"); return -1; @@ -1931,7 +1931,7 @@ uint32_t base, tmp;
/* VT82C686 power management */ - dev = pci_dev_find(0x1106, 0x3057); + dev = pcidev_find(0x1106, 0x3057); if (!dev) { msg_perr("\nERROR: VT82C686 PM device not found.\n"); return -1; @@ -2004,7 +2004,7 @@ struct pci_dev *dev; uint16_t base, temp;
- dev = pci_dev_find(0x1039, 0x0962); + dev = pcidev_find(0x1039, 0x0962); if (!dev) { msg_perr("Expected south bridge not found\n"); return 1; @@ -2068,7 +2068,7 @@ uint16_t rt_port; uint8_t val;
- dev = pci_dev_find(0x8086, 0x2410); /* Intel 82801AA ISA bridge */ + dev = pcidev_find(0x8086, 0x2410); /* Intel 82801AA ISA bridge */ if (!dev) { msg_perr("\nERROR: Intel 82801AA ISA bridge not found.\n"); return -1; @@ -2593,13 +2593,13 @@ if (!cur_model || strcasecmp(cur_model, model)) continue;
- if (!pci_dev_find(board->first_vendor, board->first_device)) { + if (!pcidev_find(board->first_vendor, board->first_device)) { msg_pdbg("Odd. Board name "%s":"%s" matches, but first PCI device %04x:%04x " "doesn't.\n", vendor, model, board->first_vendor, board->first_device); continue; }
- if (!pci_dev_find(board->second_vendor, board->second_device)) { + if (!pcidev_find(board->second_vendor, board->second_device)) { msg_pdbg("Odd. Board name "%s":"%s" matches, but second PCI device %04x:%04x " "doesn't.\n", vendor, model, board->second_vendor, board->second_device); continue; @@ -2648,7 +2648,7 @@ board->second_card_device)) continue; } else { - if (!pci_dev_find(board->second_vendor, + if (!pcidev_find(board->second_vendor, board->second_device)) continue; } diff --git a/chipset_enable.c b/chipset_enable.c index 0873fed..f48d311 100644 --- a/chipset_enable.c +++ b/chipset_enable.c @@ -1083,7 +1083,7 @@
static int enable_flash_vt_vx(struct pci_dev *dev, const char *name) { - struct pci_dev *south_north = pci_dev_find(0x1106, 0xa353); + struct pci_dev *south_north = pcidev_find(0x1106, 0xa353); if (south_north == NULL) { msg_perr("Could not find South-North Module Interface Control device!\n"); return ERROR_FATAL; @@ -1523,7 +1523,7 @@ struct pci_dev *smbusdev;
/* Look for the SMBus device. */ - smbusdev = pci_dev_find(0x1002, 0x4372); + smbusdev = pcidev_find(0x1002, 0x4372);
if (!smbusdev) { msg_perr("ERROR: SMBus device not found. Aborting.\n"); @@ -2116,7 +2116,7 @@
/* Now let's try to find the chipset we have... */ for (i = 0; chipset_enables[i].vendor_name != NULL; i++) { - dev = pci_dev_find(chipset_enables[i].vendor_id, + dev = pcidev_find(chipset_enables[i].vendor_id, chipset_enables[i].device_id); if (!dev) continue; diff --git a/pcidev.c b/pcidev.c index 629304a..d6911b1 100644 --- a/pcidev.c +++ b/pcidev.c @@ -155,7 +155,7 @@ return (uintptr_t)addr; }
-struct pci_dev *pci_dev_find(uint16_t vendor, uint16_t device) +struct pci_dev *pcidev_find(uint16_t vendor, uint16_t device) { struct pci_dev *temp; struct pci_filter filter; @@ -172,7 +172,7 @@
struct pci_dev *pcidev_find_vendorclass(uint16_t vendor, uint16_t devclass) { - struct pci_dev *temp = pci_dev_find(vendor, 0); + struct pci_dev *temp = pcidev_find(vendor, 0); if (temp) { uint16_t tmp2; /* Read PCI class */ @@ -187,7 +187,7 @@ struct pci_dev *pcidev_card_find(uint16_t vendor, uint16_t device, uint16_t card_vendor, uint16_t card_device) { - struct pci_dev *temp = pci_dev_find(vendor, device); + struct pci_dev *temp = pcidev_find(vendor, device); if (temp) { if ((card_vendor == pci_read_word(temp, PCI_SUBSYSTEM_VENDOR_ID)) && (card_device == pci_read_word(temp, PCI_SUBSYSTEM_ID))) diff --git a/programmer.h b/programmer.h index b9cd3de..ffd2516 100644 --- a/programmer.h +++ b/programmer.h @@ -128,7 +128,7 @@ struct pci_dev *pcidev_getdev(struct pci_dev *dev); struct pci_dev *pcidev_card_find(uint16_t vendor, uint16_t device, uint16_t card_vendor, uint16_t card_device); -struct pci_dev *pci_dev_find(uint16_t vendor, uint16_t device); +struct pci_dev *pcidev_find(uint16_t vendor, uint16_t 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 diff --git a/sb600spi.c b/sb600spi.c index d5e228c..de1e0fe 100644 --- a/sb600spi.c +++ b/sb600spi.c @@ -59,7 +59,7 @@
static int find_smbus_dev_rev(uint16_t vendor, uint16_t device) { - struct pci_dev *smbus_dev = pci_dev_find(vendor, device); + struct pci_dev *smbus_dev = pcidev_find(vendor, device); if (!smbus_dev) { msg_pdbg("No SMBus device with ID %04X:%04X found.\n", vendor, device); msg_perr("ERROR: SMBus device not found. Not enabling SPI.\n"); @@ -733,11 +733,11 @@ }
/* Look for the SMBus device. */ - smbus_dev = pci_dev_find(0x1002, 0x4385); + smbus_dev = pcidev_find(0x1002, 0x4385); if (!smbus_dev) - smbus_dev = pci_dev_find(0x1022, 0x780b); /* AMD FCH */ + smbus_dev = pcidev_find(0x1022, 0x780b); /* AMD FCH */ if (!smbus_dev) - smbus_dev = pci_dev_find(0x1022, 0x790b); /* AMD FP4 */ + smbus_dev = pcidev_find(0x1022, 0x790b); /* AMD FP4 */ if (!smbus_dev) { msg_perr("ERROR: SMBus device not found. Not enabling SPI.\n"); return ERROR_NONFATAL;