diff options
author | Felix Singer <felixsinger@posteo.net> | 2022-03-07 04:34:52 +0100 |
---|---|---|
committer | Felix Singer <felixsinger@posteo.net> | 2022-03-07 08:32:09 +0000 |
commit | 43b7f416783ccc98952a4eb5f9274907442b03e5 (patch) | |
tree | 86a45336e809bee5d2891f2be9cf00184da9bb18 /src/drivers | |
parent | 2c423441c054d7a8c93cc814b9db5f8f7185bd0f (diff) |
src: Make PCI ID define names shorter
Shorten define names containing PCI_{DEVICE,VENDOR}_ID_ with
PCI_{DID,VID}_ using the commands below, which also take care of some
spacing issues. An additional clean up of pci_ids.h is done in
CB:61531.
Used commands:
* find -type f -exec sed -i 's/PCI_\([DV]\)\(EVICE\|ENDOR\)_ID_\([_0-9A-Za-z]\{2\}\([_0-9A-Za-z]\{8\}\)*[_0-9A-Za-z]\{0,5\}\)\t/PCI_\1ID_\3\t\t/g'
* find -type f -exec sed -i 's/PCI_\([DV]\)\(EVICE\|ENDOR\)_ID_\([_0-9A-Za-z]*\)/PCI_\1ID_\3/g'
Change-Id: If9027700f53b6d0d3964c26a41a1f9b8f62be178
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/39331
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Diffstat (limited to 'src/drivers')
-rw-r--r-- | src/drivers/aspeed/ast2050/ast2050.c | 4 | ||||
-rw-r--r-- | src/drivers/broadcom/bcm57xx_aspm_disable.c | 2 | ||||
-rw-r--r-- | src/drivers/generic/bayhub/bh720.c | 4 | ||||
-rw-r--r-- | src/drivers/generic/bayhub_lv2/lv2.c | 4 | ||||
-rw-r--r-- | src/drivers/genesyslogic/gl9750/gl9750.c | 4 | ||||
-rw-r--r-- | src/drivers/genesyslogic/gl9755/gl9755.c | 4 | ||||
-rw-r--r-- | src/drivers/genesyslogic/gl9763e/gl9763e.c | 4 | ||||
-rw-r--r-- | src/drivers/intel/gma/opregion.c | 2 | ||||
-rw-r--r-- | src/drivers/intel/i210/i210.c | 2 | ||||
-rw-r--r-- | src/drivers/intel/ish/ish.c | 10 | ||||
-rw-r--r-- | src/drivers/net/r8168.c | 8 | ||||
-rw-r--r-- | src/drivers/ricoh/rce822/rce822.c | 2 | ||||
-rw-r--r-- | src/drivers/siemens/nc_fpga/nc_fpga.c | 2 | ||||
-rw-r--r-- | src/drivers/siemens/nc_fpga/nc_fpga_early.c | 2 | ||||
-rw-r--r-- | src/drivers/usb/pci_xhci/pci_xhci.c | 10 | ||||
-rw-r--r-- | src/drivers/wifi/generic/acpi.c | 2 | ||||
-rw-r--r-- | src/drivers/wifi/generic/generic.c | 62 | ||||
-rw-r--r-- | src/drivers/wifi/generic/smbios.c | 2 |
18 files changed, 65 insertions, 65 deletions
diff --git a/src/drivers/aspeed/ast2050/ast2050.c b/src/drivers/aspeed/ast2050/ast2050.c index 5cb7198c29..7ead9a832f 100644 --- a/src/drivers/aspeed/ast2050/ast2050.c +++ b/src/drivers/aspeed/ast2050/ast2050.c @@ -60,6 +60,6 @@ static struct device_operations aspeed_ast2050_ops = { static const struct pci_driver aspeed_ast2050_driver __pci_driver = { .ops = &aspeed_ast2050_ops, - .vendor = PCI_VENDOR_ID_ASPEED, - .device = PCI_DEVICE_ID_ASPEED_AST2050_VGA, + .vendor = PCI_VID_ASPEED, + .device = PCI_DID_ASPEED_AST2050_VGA, }; diff --git a/src/drivers/broadcom/bcm57xx_aspm_disable.c b/src/drivers/broadcom/bcm57xx_aspm_disable.c index 197be1e194..130e981551 100644 --- a/src/drivers/broadcom/bcm57xx_aspm_disable.c +++ b/src/drivers/broadcom/bcm57xx_aspm_disable.c @@ -27,6 +27,6 @@ static const unsigned short pci_device_ids[] = { static const struct pci_driver bcm57xx_aspm_fixup __pci_driver = { .ops = &bcm57xx_aspm_fixup_ops, - .vendor = PCI_VENDOR_ID_BROADCOM, + .vendor = PCI_VID_BROADCOM, .devices = pci_device_ids, }; diff --git a/src/drivers/generic/bayhub/bh720.c b/src/drivers/generic/bayhub/bh720.c index 58a50173dd..8358b6a8e9 100644 --- a/src/drivers/generic/bayhub/bh720.c +++ b/src/drivers/generic/bayhub/bh720.c @@ -108,13 +108,13 @@ static struct device_operations bh720_ops = { }; static const unsigned short pci_device_ids[] = { - PCI_DEVICE_ID_O2_BH720, + PCI_DID_O2_BH720, 0 }; static const struct pci_driver bayhub_bh720 __pci_driver = { .ops = &bh720_ops, - .vendor = PCI_VENDOR_ID_O2, + .vendor = PCI_VID_O2, .devices = pci_device_ids, }; diff --git a/src/drivers/generic/bayhub_lv2/lv2.c b/src/drivers/generic/bayhub_lv2/lv2.c index 7cd8a3651f..3a249e0419 100644 --- a/src/drivers/generic/bayhub_lv2/lv2.c +++ b/src/drivers/generic/bayhub_lv2/lv2.c @@ -70,13 +70,13 @@ static struct device_operations lv2_ops = { }; static const unsigned short pci_device_ids[] = { - PCI_DEVICE_ID_O2_LV2, + PCI_DID_O2_LV2, 0 }; static const struct pci_driver bayhub_lv2 __pci_driver = { .ops = &lv2_ops, - .vendor = PCI_VENDOR_ID_O2, + .vendor = PCI_VID_O2, .devices = pci_device_ids, }; diff --git a/src/drivers/genesyslogic/gl9750/gl9750.c b/src/drivers/genesyslogic/gl9750/gl9750.c index ca5cd096a5..c021eadf00 100644 --- a/src/drivers/genesyslogic/gl9750/gl9750.c +++ b/src/drivers/genesyslogic/gl9750/gl9750.c @@ -35,13 +35,13 @@ static struct device_operations gl9750_ops = { }; static const unsigned short pci_device_ids[] = { - PCI_DEVICE_ID_GLI_9750, + PCI_DID_GLI_9750, 0 }; static const struct pci_driver genesyslogic_gl9750 __pci_driver = { .ops = &gl9750_ops, - .vendor = PCI_VENDOR_ID_GLI, + .vendor = PCI_VID_GLI, .devices = pci_device_ids, }; diff --git a/src/drivers/genesyslogic/gl9755/gl9755.c b/src/drivers/genesyslogic/gl9755/gl9755.c index 44342c6632..bf4831c504 100644 --- a/src/drivers/genesyslogic/gl9755/gl9755.c +++ b/src/drivers/genesyslogic/gl9755/gl9755.c @@ -47,13 +47,13 @@ static struct device_operations gl9755_ops = { }; static const unsigned short pci_device_ids[] = { - PCI_DEVICE_ID_GLI_9755, + PCI_DID_GLI_9755, 0 }; static const struct pci_driver genesyslogic_gl9755 __pci_driver = { .ops = &gl9755_ops, - .vendor = PCI_VENDOR_ID_GLI, + .vendor = PCI_VID_GLI, .devices = pci_device_ids, }; diff --git a/src/drivers/genesyslogic/gl9763e/gl9763e.c b/src/drivers/genesyslogic/gl9763e/gl9763e.c index cd581b9380..4dcfbdcbd0 100644 --- a/src/drivers/genesyslogic/gl9763e/gl9763e.c +++ b/src/drivers/genesyslogic/gl9763e/gl9763e.c @@ -50,13 +50,13 @@ static struct device_operations gl9763e_ops = { }; static const unsigned short pci_device_ids[] = { - PCI_DEVICE_ID_GLI_9763E, + PCI_DID_GLI_9763E, 0 }; static const struct pci_driver genesyslogic_gl9763e __pci_driver = { .ops = &gl9763e_ops, - .vendor = PCI_VENDOR_ID_GLI, + .vendor = PCI_VID_GLI, .devices = pci_device_ids, }; diff --git a/src/drivers/intel/gma/opregion.c b/src/drivers/intel/gma/opregion.c index 430bda35b1..ff77f653b0 100644 --- a/src/drivers/intel/gma/opregion.c +++ b/src/drivers/intel/gma/opregion.c @@ -159,7 +159,7 @@ static enum cb_err locate_vbt_vbios(const u8 *vbios, struct region_device *rdev) /* Make sure we got an Intel VGA option rom */ if ((oprom->signature != OPROM_SIGNATURE) || - (pcir->vendor != PCI_VENDOR_ID_INTEL) || + (pcir->vendor != PCI_VID_INTEL) || (pcir->signature != 0x52494350) || (pcir->classcode[0] != 0x00) || (pcir->classcode[1] != 0x00) || diff --git a/src/drivers/intel/i210/i210.c b/src/drivers/intel/i210/i210.c index 32cae6f269..0b2fcd250e 100644 --- a/src/drivers/intel/i210/i210.c +++ b/src/drivers/intel/i210/i210.c @@ -224,6 +224,6 @@ static const unsigned short i210_device_ids[] = { 0x1537, 0x1538, 0x1533, 0 }; static const struct pci_driver i210_driver __pci_driver = { .ops = &i210_ops, - .vendor = PCI_VENDOR_ID_INTEL, + .vendor = PCI_VID_INTEL, .devices = i210_device_ids, }; diff --git a/src/drivers/intel/ish/ish.c b/src/drivers/intel/ish/ish.c index 9ab4f2d510..7718ac543f 100644 --- a/src/drivers/intel/ish/ish.c +++ b/src/drivers/intel/ish/ish.c @@ -51,16 +51,16 @@ static const struct device_operations pci_ish_device_ops = { }; static const unsigned short pci_device_ids[] = { - PCI_DEVICE_ID_INTEL_CNL_ISHB, - PCI_DEVICE_ID_INTEL_CML_ISHB, - PCI_DEVICE_ID_INTEL_TGL_ISHB, - PCI_DEVICE_ID_INTEL_TGL_H_ISHB, + PCI_DID_INTEL_CNL_ISHB, + PCI_DID_INTEL_CML_ISHB, + PCI_DID_INTEL_TGL_ISHB, + PCI_DID_INTEL_TGL_H_ISHB, 0 }; static const struct pci_driver ish_intel_driver __pci_driver = { .ops = &pci_ish_device_ops, - .vendor = PCI_VENDOR_ID_INTEL, + .vendor = PCI_VID_INTEL, .devices = pci_device_ids, }; diff --git a/src/drivers/net/r8168.c b/src/drivers/net/r8168.c index 3432249f8a..b4ef40e426 100644 --- a/src/drivers/net/r8168.c +++ b/src/drivers/net/r8168.c @@ -267,7 +267,7 @@ static void r8168_set_customized_led(struct device *dev, u16 io_base) if (!config) return; - if (dev->device == PCI_DEVICE_ID_REALTEK_8125) { + if (dev->device == PCI_DID_REALTEK_8125) { /* Set LED global Feature register */ outb(config->led_feature, io_base + CMD_LED_FEATURE); printk(BIOS_DEBUG, "r8125: read back LED global feature setting as 0x%x\n", @@ -425,14 +425,14 @@ static struct device_operations r8168_ops = { }; static const unsigned short pci_device_ids[] = { - PCI_DEVICE_ID_REALTEK_8168, - PCI_DEVICE_ID_REALTEK_8125, + PCI_DID_REALTEK_8168, + PCI_DID_REALTEK_8125, 0 }; static const struct pci_driver r8168_driver __pci_driver = { .ops = &r8168_ops, - .vendor = PCI_VENDOR_ID_REALTEK, + .vendor = PCI_VID_REALTEK, .devices = pci_device_ids, }; diff --git a/src/drivers/ricoh/rce822/rce822.c b/src/drivers/ricoh/rce822/rce822.c index 9d8c399804..c85b4d1bff 100644 --- a/src/drivers/ricoh/rce822/rce822.c +++ b/src/drivers/ricoh/rce822/rce822.c @@ -53,7 +53,7 @@ static const unsigned short pci_device_ids[] = { 0xe822, 0xe823, 0 }; static const struct pci_driver rce822 __pci_driver = { .ops = &rce822_ops, - .vendor = PCI_VENDOR_ID_RICOH, + .vendor = PCI_VID_RICOH, .devices = pci_device_ids, }; diff --git a/src/drivers/siemens/nc_fpga/nc_fpga.c b/src/drivers/siemens/nc_fpga/nc_fpga.c index 0b4c7d47ea..fe6eb155c6 100644 --- a/src/drivers/siemens/nc_fpga/nc_fpga.c +++ b/src/drivers/siemens/nc_fpga/nc_fpga.c @@ -165,6 +165,6 @@ static const unsigned short nc_fpga_device_ids[] = { 0x4080, 0x4091, 0 }; static const struct pci_driver nc_fpga_driver __pci_driver = { .ops = &nc_fpga_ops, - .vendor = PCI_VENDOR_ID_SIEMENS, + .vendor = PCI_VID_SIEMENS, .devices = nc_fpga_device_ids, }; diff --git a/src/drivers/siemens/nc_fpga/nc_fpga_early.c b/src/drivers/siemens/nc_fpga/nc_fpga_early.c index 6ec0349922..a68beb2687 100644 --- a/src/drivers/siemens/nc_fpga/nc_fpga_early.c +++ b/src/drivers/siemens/nc_fpga/nc_fpga_early.c @@ -17,7 +17,7 @@ int pci_early_device_probe(u8 bus, u8 dev, u32 mmio_base) pci_devfn_t pci_dev = PCI_DEV(bus, dev, 0); uint32_t id = pci_s_read_config32(pci_dev, PCI_VENDOR_ID); - if (id != (0x4091 << 16 | PCI_VENDOR_ID_SIEMENS)) + if (id != (0x4091 << 16 | PCI_VID_SIEMENS)) return -1; /* Setup base address for BAR0. */ diff --git a/src/drivers/usb/pci_xhci/pci_xhci.c b/src/drivers/usb/pci_xhci/pci_xhci.c index 26bc9c0964..1952130e1a 100644 --- a/src/drivers/usb/pci_xhci/pci_xhci.c +++ b/src/drivers/usb/pci_xhci/pci_xhci.c @@ -253,15 +253,15 @@ static const struct device_operations xhci_pci_ops = { }; static const unsigned short amd_pci_device_ids[] = { - PCI_DEVICE_ID_AMD_FAM17H_MODEL18H_XHCI0, - PCI_DEVICE_ID_AMD_FAM17H_MODEL18H_XHCI1, - PCI_DEVICE_ID_AMD_FAM17H_MODEL20H_XHCI0, - PCI_DEVICE_ID_AMD_FAM17H_MODEL60H_XHCI, + PCI_DID_AMD_FAM17H_MODEL18H_XHCI0, + PCI_DID_AMD_FAM17H_MODEL18H_XHCI1, + PCI_DID_AMD_FAM17H_MODEL20H_XHCI0, + PCI_DID_AMD_FAM17H_MODEL60H_XHCI, 0 }; static const struct pci_driver xhci_pci_driver __pci_driver = { .ops = &xhci_pci_ops, - .vendor = PCI_VENDOR_ID_AMD, + .vendor = PCI_VID_AMD, .devices = amd_pci_device_ids, }; diff --git a/src/drivers/wifi/generic/acpi.c b/src/drivers/wifi/generic/acpi.c index 16c1839c23..63faae0176 100644 --- a/src/drivers/wifi/generic/acpi.c +++ b/src/drivers/wifi/generic/acpi.c @@ -470,7 +470,7 @@ static void emit_sar_acpi_structures(const struct device *dev) * If device type is PCI, ensure that the device has Intel vendor ID. CBFS SAR and SAR * ACPI tables are currently used only by Intel WiFi devices. */ - if (dev->path.type == DEVICE_PATH_PCI && dev->vendor != PCI_VENDOR_ID_INTEL) + if (dev->path.type == DEVICE_PATH_PCI && dev->vendor != PCI_VID_INTEL) return; /* Retrieve the sar limits data */ diff --git a/src/drivers/wifi/generic/generic.c b/src/drivers/wifi/generic/generic.c index 1ee7ab23ee..de93741f27 100644 --- a/src/drivers/wifi/generic/generic.c +++ b/src/drivers/wifi/generic/generic.c @@ -59,44 +59,44 @@ struct chip_operations drivers_wifi_generic_ops = { }; static const unsigned short intel_pci_device_ids[] = { - PCI_DEVICE_ID_1000_SERIES_WIFI, - PCI_DEVICE_ID_6005_SERIES_WIFI, - PCI_DEVICE_ID_6005_I_SERIES_WIFI, - PCI_DEVICE_ID_1030_SERIES_WIFI, - PCI_DEVICE_ID_6030_I_SERIES_WIFI, - PCI_DEVICE_ID_6030_SERIES_WIFI, - PCI_DEVICE_ID_6150_SERIES_WIFI, - PCI_DEVICE_ID_2030_SERIES_WIFI, - PCI_DEVICE_ID_2000_SERIES_WIFI, - PCI_DEVICE_ID_0135_SERIES_WIFI, - PCI_DEVICE_ID_0105_SERIES_WIFI, - PCI_DEVICE_ID_6035_SERIES_WIFI, - PCI_DEVICE_ID_5300_SERIES_WIFI, - PCI_DEVICE_ID_5100_SERIES_WIFI, - PCI_DEVICE_ID_6000_SERIES_WIFI, - PCI_DEVICE_ID_6000_I_SERIES_WIFI, - PCI_DEVICE_ID_5350_SERIES_WIFI, - PCI_DEVICE_ID_5150_SERIES_WIFI, + PCI_DID_1000_SERIES_WIFI, + PCI_DID_6005_SERIES_WIFI, + PCI_DID_6005_I_SERIES_WIFI, + PCI_DID_1030_SERIES_WIFI, + PCI_DID_6030_I_SERIES_WIFI, + PCI_DID_6030_SERIES_WIFI, + PCI_DID_6150_SERIES_WIFI, + PCI_DID_2030_SERIES_WIFI, + PCI_DID_2000_SERIES_WIFI, + PCI_DID_0135_SERIES_WIFI, + PCI_DID_0105_SERIES_WIFI, + PCI_DID_6035_SERIES_WIFI, + PCI_DID_5300_SERIES_WIFI, + PCI_DID_5100_SERIES_WIFI, + PCI_DID_6000_SERIES_WIFI, + PCI_DID_6000_I_SERIES_WIFI, + PCI_DID_5350_SERIES_WIFI, + PCI_DID_5150_SERIES_WIFI, /* Wilkins Peak 2 */ - PCI_DEVICE_ID_WP_7260_SERIES_1_WIFI, - PCI_DEVICE_ID_WP_7260_SERIES_2_WIFI, + PCI_DID_WP_7260_SERIES_1_WIFI, + PCI_DID_WP_7260_SERIES_2_WIFI, /* Stone Peak 2 */ - PCI_DEVICE_ID_SP_7265_SERIES_1_WIFI, - PCI_DEVICE_ID_SP_7265_SERIES_2_WIFI, + PCI_DID_SP_7265_SERIES_1_WIFI, + PCI_DID_SP_7265_SERIES_2_WIFI, /* Stone Field Peak */ - PCI_DEVICE_ID_SFP_8260_SERIES_1_WIFI, - PCI_DEVICE_ID_SFP_8260_SERIES_2_WIFI, + PCI_DID_SFP_8260_SERIES_1_WIFI, + PCI_DID_SFP_8260_SERIES_2_WIFI, /* Windstorm Peak */ - PCI_DEVICE_ID_WSP_8275_SERIES_1_WIFI, + PCI_DID_WSP_8275_SERIES_1_WIFI, /* Thunder Peak 2 */ - PCI_DEVICE_ID_TP_9260_SERIES_WIFI, + PCI_DID_TP_9260_SERIES_WIFI, /* Cyclone Peak */ - PCI_DEVICE_ID_CyP_6SERIES_WIFI, + PCI_DID_CyP_6SERIES_WIFI, /* Typhoon Peak */ - PCI_DEVICE_ID_TyP_6SERIES_WIFI, + PCI_DID_TyP_6SERIES_WIFI, /* Garfield Peak */ - PCI_DEVICE_ID_GrP_6SERIES_1_WIFI, - PCI_DEVICE_ID_GrP_6SERIES_2_WIFI, + PCI_DID_GrP_6SERIES_1_WIFI, + PCI_DID_GrP_6SERIES_2_WIFI, 0 }; @@ -108,6 +108,6 @@ static const unsigned short intel_pci_device_ids[] = { */ static const struct pci_driver intel_wifi_pci_driver __pci_driver = { .ops = &wifi_pcie_ops, - .vendor = PCI_VENDOR_ID_INTEL, + .vendor = PCI_VID_INTEL, .devices = intel_pci_device_ids, }; diff --git a/src/drivers/wifi/generic/smbios.c b/src/drivers/wifi/generic/smbios.c index 9c83df655e..82c96a52a8 100644 --- a/src/drivers/wifi/generic/smbios.c +++ b/src/drivers/wifi/generic/smbios.c @@ -8,7 +8,7 @@ static int smbios_write_intel_wifi(struct device *dev, int *handle, unsigned long *current) { - if (dev->vendor != PCI_VENDOR_ID_INTEL) + if (dev->vendor != PCI_VID_INTEL) return 0; struct smbios_type_intel_wifi { |