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>
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
||||
|
@@ -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,
|
||||
};
|
||||
|
||||
|
@@ -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,
|
||||
};
|
||||
|
||||
|
@@ -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,
|
||||
};
|
||||
|
||||
|
@@ -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,
|
||||
};
|
||||
|
||||
|
@@ -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) ||
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
||||
|
@@ -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,
|
||||
};
|
||||
|
||||
|
@@ -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,
|
||||
};
|
||||
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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. */
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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 */
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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 {
|
||||
|
Reference in New Issue
Block a user