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>
diff --git a/src/southbridge/intel/lynxpoint/azalia.c b/src/southbridge/intel/lynxpoint/azalia.c
index 1bde180..f41b3c2 100644
--- a/src/southbridge/intel/lynxpoint/azalia.c
+++ b/src/southbridge/intel/lynxpoint/azalia.c
@@ -121,13 +121,13 @@
};
static const unsigned short pci_device_ids[] = {
- PCI_DEVICE_ID_INTEL_LPT_H_AUDIO,
- PCI_DEVICE_ID_INTEL_LPT_LP_AUDIO,
+ PCI_DID_INTEL_LPT_H_AUDIO,
+ PCI_DID_INTEL_LPT_LP_AUDIO,
0
};
static const struct pci_driver pch_azalia __pci_driver = {
.ops = &azalia_ops,
- .vendor = PCI_VENDOR_ID_INTEL,
+ .vendor = PCI_VID_INTEL,
.devices = pci_device_ids,
};
diff --git a/src/southbridge/intel/lynxpoint/lpc.c b/src/southbridge/intel/lynxpoint/lpc.c
index 71ce080..73cf37f 100644
--- a/src/southbridge/intel/lynxpoint/lpc.c
+++ b/src/southbridge/intel/lynxpoint/lpc.c
@@ -816,30 +816,30 @@
/* IDs for LPC device of Intel 8 Series Chipset (Lynx Point) */
static const unsigned short pci_device_ids[] = {
- PCI_DEVICE_ID_INTEL_LPT_MOBILE_SAMPLE,
- PCI_DEVICE_ID_INTEL_LPT_DESKTOP_SAMPLE,
- PCI_DEVICE_ID_INTEL_LPT_Z87,
- PCI_DEVICE_ID_INTEL_LPT_Z85,
- PCI_DEVICE_ID_INTEL_LPT_HM86,
- PCI_DEVICE_ID_INTEL_LPT_H87,
- PCI_DEVICE_ID_INTEL_LPT_HM87,
- PCI_DEVICE_ID_INTEL_LPT_Q85,
- PCI_DEVICE_ID_INTEL_LPT_Q87,
- PCI_DEVICE_ID_INTEL_LPT_QM87,
- PCI_DEVICE_ID_INTEL_LPT_B85,
- PCI_DEVICE_ID_INTEL_LPT_C222,
- PCI_DEVICE_ID_INTEL_LPT_C224,
- PCI_DEVICE_ID_INTEL_LPT_C226,
- PCI_DEVICE_ID_INTEL_LPT_H81,
- PCI_DEVICE_ID_INTEL_LPT_LP_SAMPLE,
- PCI_DEVICE_ID_INTEL_LPT_LP_PREMIUM,
- PCI_DEVICE_ID_INTEL_LPT_LP_MAINSTREAM,
- PCI_DEVICE_ID_INTEL_LPT_LP_VALUE,
+ PCI_DID_INTEL_LPT_MOBILE_SAMPLE,
+ PCI_DID_INTEL_LPT_DESKTOP_SAMPLE,
+ PCI_DID_INTEL_LPT_Z87,
+ PCI_DID_INTEL_LPT_Z85,
+ PCI_DID_INTEL_LPT_HM86,
+ PCI_DID_INTEL_LPT_H87,
+ PCI_DID_INTEL_LPT_HM87,
+ PCI_DID_INTEL_LPT_Q85,
+ PCI_DID_INTEL_LPT_Q87,
+ PCI_DID_INTEL_LPT_QM87,
+ PCI_DID_INTEL_LPT_B85,
+ PCI_DID_INTEL_LPT_C222,
+ PCI_DID_INTEL_LPT_C224,
+ PCI_DID_INTEL_LPT_C226,
+ PCI_DID_INTEL_LPT_H81,
+ PCI_DID_INTEL_LPT_LP_SAMPLE,
+ PCI_DID_INTEL_LPT_LP_PREMIUM,
+ PCI_DID_INTEL_LPT_LP_MAINSTREAM,
+ PCI_DID_INTEL_LPT_LP_VALUE,
0
};
static const struct pci_driver pch_lpc __pci_driver = {
.ops = &device_ops,
- .vendor = PCI_VENDOR_ID_INTEL,
+ .vendor = PCI_VID_INTEL,
.devices = pci_device_ids,
};
diff --git a/src/southbridge/intel/lynxpoint/me.c b/src/southbridge/intel/lynxpoint/me.c
index ca6aff7..40626c2 100644
--- a/src/southbridge/intel/lynxpoint/me.c
+++ b/src/southbridge/intel/lynxpoint/me.c
@@ -920,13 +920,13 @@
};
static const unsigned short pci_device_ids[] = {
- PCI_DEVICE_ID_INTEL_LPT_H_MEI,
- PCI_DEVICE_ID_INTEL_LPT_LP_MEI,
+ PCI_DID_INTEL_LPT_H_MEI,
+ PCI_DID_INTEL_LPT_LP_MEI,
0
};
static const struct pci_driver intel_me __pci_driver = {
.ops = &device_ops,
- .vendor = PCI_VENDOR_ID_INTEL,
+ .vendor = PCI_VID_INTEL,
.devices = pci_device_ids,
};
diff --git a/src/southbridge/intel/lynxpoint/pcie.c b/src/southbridge/intel/lynxpoint/pcie.c
index 30773e6..24fab3b 100644
--- a/src/southbridge/intel/lynxpoint/pcie.c
+++ b/src/southbridge/intel/lynxpoint/pcie.c
@@ -38,7 +38,7 @@
static inline int max_root_ports(void)
{
- if (pch_is_lp() || pch_silicon_id() == PCI_DEVICE_ID_INTEL_LPT_H81)
+ if (pch_is_lp() || pch_silicon_id() == PCI_DID_INTEL_LPT_H81)
return 6;
return 8;
@@ -749,25 +749,25 @@
};
static const unsigned short pci_device_ids[] = {
- PCI_DEVICE_ID_INTEL_LPT_H_PCIE_RP1,
- PCI_DEVICE_ID_INTEL_LPT_H_PCIE_RP2,
- PCI_DEVICE_ID_INTEL_LPT_H_PCIE_RP3,
- PCI_DEVICE_ID_INTEL_LPT_H_PCIE_RP4,
- PCI_DEVICE_ID_INTEL_LPT_H_PCIE_RP5,
- PCI_DEVICE_ID_INTEL_LPT_H_PCIE_RP6,
- PCI_DEVICE_ID_INTEL_LPT_H_PCIE_RP7,
- PCI_DEVICE_ID_INTEL_LPT_H_PCIE_RP8,
- PCI_DEVICE_ID_INTEL_LPT_LP_PCIE_RP1,
- PCI_DEVICE_ID_INTEL_LPT_LP_PCIE_RP2,
- PCI_DEVICE_ID_INTEL_LPT_LP_PCIE_RP3,
- PCI_DEVICE_ID_INTEL_LPT_LP_PCIE_RP4,
- PCI_DEVICE_ID_INTEL_LPT_LP_PCIE_RP5,
- PCI_DEVICE_ID_INTEL_LPT_LP_PCIE_RP6,
+ PCI_DID_INTEL_LPT_H_PCIE_RP1,
+ PCI_DID_INTEL_LPT_H_PCIE_RP2,
+ PCI_DID_INTEL_LPT_H_PCIE_RP3,
+ PCI_DID_INTEL_LPT_H_PCIE_RP4,
+ PCI_DID_INTEL_LPT_H_PCIE_RP5,
+ PCI_DID_INTEL_LPT_H_PCIE_RP6,
+ PCI_DID_INTEL_LPT_H_PCIE_RP7,
+ PCI_DID_INTEL_LPT_H_PCIE_RP8,
+ PCI_DID_INTEL_LPT_LP_PCIE_RP1,
+ PCI_DID_INTEL_LPT_LP_PCIE_RP2,
+ PCI_DID_INTEL_LPT_LP_PCIE_RP3,
+ PCI_DID_INTEL_LPT_LP_PCIE_RP4,
+ PCI_DID_INTEL_LPT_LP_PCIE_RP5,
+ PCI_DID_INTEL_LPT_LP_PCIE_RP6,
0
};
static const struct pci_driver pch_pcie __pci_driver = {
.ops = &device_ops,
- .vendor = PCI_VENDOR_ID_INTEL,
+ .vendor = PCI_VID_INTEL,
.devices = pci_device_ids,
};
diff --git a/src/southbridge/intel/lynxpoint/sata.c b/src/southbridge/intel/lynxpoint/sata.c
index c90c096..49108ee 100644
--- a/src/southbridge/intel/lynxpoint/sata.c
+++ b/src/southbridge/intel/lynxpoint/sata.c
@@ -219,27 +219,27 @@
};
static const unsigned short pci_device_ids[] = {
- PCI_DEVICE_ID_INTEL_LPT_H_DESKTOP_SATA_IDE,
- PCI_DEVICE_ID_INTEL_LPT_H_DESKTOP_SATA_AHCI,
- PCI_DEVICE_ID_INTEL_LPT_H_DESKTOP_SATA_RAID_1,
- PCI_DEVICE_ID_INTEL_LPT_H_DESKTOP_SATA_RAID_PREM,
- PCI_DEVICE_ID_INTEL_LPT_H_DESKTOP_SATA_IDE_P45,
- PCI_DEVICE_ID_INTEL_LPT_H_DESKTOP_SATA_RAID_2,
- PCI_DEVICE_ID_INTEL_LPT_H_MOBILE_SATA_IDE,
- PCI_DEVICE_ID_INTEL_LPT_H_MOBILE_SATA_AHCI,
- PCI_DEVICE_ID_INTEL_LPT_H_MOBILE_SATA_RAID_1,
- PCI_DEVICE_ID_INTEL_LPT_H_MOBILE_SATA_RAID_PREM,
- PCI_DEVICE_ID_INTEL_LPT_H_MOBILE_SATA_IDE_P45,
- PCI_DEVICE_ID_INTEL_LPT_H_MOBILE_SATA_RAID_2,
- PCI_DEVICE_ID_INTEL_LPT_LP_SATA_AHCI,
- PCI_DEVICE_ID_INTEL_LPT_LP_SATA_RAID_1,
- PCI_DEVICE_ID_INTEL_LPT_LP_SATA_RAID_PREM,
- PCI_DEVICE_ID_INTEL_LPT_LP_SATA_RAID_2,
+ PCI_DID_INTEL_LPT_H_DESKTOP_SATA_IDE,
+ PCI_DID_INTEL_LPT_H_DESKTOP_SATA_AHCI,
+ PCI_DID_INTEL_LPT_H_DESKTOP_SATA_RAID_1,
+ PCI_DID_INTEL_LPT_H_DESKTOP_SATA_RAID_PREM,
+ PCI_DID_INTEL_LPT_H_DESKTOP_SATA_IDE_P45,
+ PCI_DID_INTEL_LPT_H_DESKTOP_SATA_RAID_2,
+ PCI_DID_INTEL_LPT_H_MOBILE_SATA_IDE,
+ PCI_DID_INTEL_LPT_H_MOBILE_SATA_AHCI,
+ PCI_DID_INTEL_LPT_H_MOBILE_SATA_RAID_1,
+ PCI_DID_INTEL_LPT_H_MOBILE_SATA_RAID_PREM,
+ PCI_DID_INTEL_LPT_H_MOBILE_SATA_IDE_P45,
+ PCI_DID_INTEL_LPT_H_MOBILE_SATA_RAID_2,
+ PCI_DID_INTEL_LPT_LP_SATA_AHCI,
+ PCI_DID_INTEL_LPT_LP_SATA_RAID_1,
+ PCI_DID_INTEL_LPT_LP_SATA_RAID_PREM,
+ PCI_DID_INTEL_LPT_LP_SATA_RAID_2,
0
};
static const struct pci_driver pch_sata __pci_driver = {
.ops = &sata_ops,
- .vendor = PCI_VENDOR_ID_INTEL,
+ .vendor = PCI_VID_INTEL,
.devices = pci_device_ids,
};
diff --git a/src/southbridge/intel/lynxpoint/serialio.c b/src/southbridge/intel/lynxpoint/serialio.c
index 0aa683d..208c52a 100644
--- a/src/southbridge/intel/lynxpoint/serialio.c
+++ b/src/southbridge/intel/lynxpoint/serialio.c
@@ -259,19 +259,19 @@
};
static const unsigned short pci_device_ids[] = {
- PCI_DEVICE_ID_INTEL_LPT_LP_SDMA,
- PCI_DEVICE_ID_INTEL_LPT_LP_I2C0,
- PCI_DEVICE_ID_INTEL_LPT_LP_I2C1,
- PCI_DEVICE_ID_INTEL_LPT_LP_GSPI0,
- PCI_DEVICE_ID_INTEL_LPT_LP_GSPI1,
- PCI_DEVICE_ID_INTEL_LPT_LP_UART0,
- PCI_DEVICE_ID_INTEL_LPT_LP_UART1,
- PCI_DEVICE_ID_INTEL_LPT_LP_SD,
+ PCI_DID_INTEL_LPT_LP_SDMA,
+ PCI_DID_INTEL_LPT_LP_I2C0,
+ PCI_DID_INTEL_LPT_LP_I2C1,
+ PCI_DID_INTEL_LPT_LP_GSPI0,
+ PCI_DID_INTEL_LPT_LP_GSPI1,
+ PCI_DID_INTEL_LPT_LP_UART0,
+ PCI_DID_INTEL_LPT_LP_UART1,
+ PCI_DID_INTEL_LPT_LP_SD,
0
};
static const struct pci_driver pch_pcie __pci_driver = {
.ops = &device_ops,
- .vendor = PCI_VENDOR_ID_INTEL,
+ .vendor = PCI_VID_INTEL,
.devices = pci_device_ids,
};
diff --git a/src/southbridge/intel/lynxpoint/smbus.c b/src/southbridge/intel/lynxpoint/smbus.c
index f41e322..519afe5 100644
--- a/src/southbridge/intel/lynxpoint/smbus.c
+++ b/src/southbridge/intel/lynxpoint/smbus.c
@@ -34,14 +34,14 @@
};
static const unsigned short pci_device_ids[] = {
- PCI_DEVICE_ID_INTEL_LPT_H_SMBUS,
- PCI_DEVICE_ID_INTEL_LPT_LP_SMBUS,
- PCI_DEVICE_ID_INTEL_WPT_LP_SMBUS,
+ PCI_DID_INTEL_LPT_H_SMBUS,
+ PCI_DID_INTEL_LPT_LP_SMBUS,
+ PCI_DID_INTEL_WPT_LP_SMBUS,
0
};
static const struct pci_driver pch_smbus __pci_driver = {
.ops = &smbus_ops,
- .vendor = PCI_VENDOR_ID_INTEL,
+ .vendor = PCI_VID_INTEL,
.devices = pci_device_ids,
};
diff --git a/src/southbridge/intel/lynxpoint/usb_ehci.c b/src/southbridge/intel/lynxpoint/usb_ehci.c
index d718ab3..8853a14 100644
--- a/src/southbridge/intel/lynxpoint/usb_ehci.c
+++ b/src/southbridge/intel/lynxpoint/usb_ehci.c
@@ -170,15 +170,15 @@
};
static const unsigned short pci_device_ids[] = {
- PCI_DEVICE_ID_INTEL_LPT_LP_EHCI,
- PCI_DEVICE_ID_INTEL_LPT_H_EHCI_1,
- PCI_DEVICE_ID_INTEL_LPT_H_EHCI_2,
+ PCI_DID_INTEL_LPT_LP_EHCI,
+ PCI_DID_INTEL_LPT_H_EHCI_1,
+ PCI_DID_INTEL_LPT_H_EHCI_2,
0
};
static const struct pci_driver pch_usb_ehci __pci_driver = {
.ops = &usb_ehci_ops,
- .vendor = PCI_VENDOR_ID_INTEL,
+ .vendor = PCI_VID_INTEL,
.devices = pci_device_ids,
};
diff --git a/src/southbridge/intel/lynxpoint/usb_xhci.c b/src/southbridge/intel/lynxpoint/usb_xhci.c
index f049ee2..1219bcc 100644
--- a/src/southbridge/intel/lynxpoint/usb_xhci.c
+++ b/src/southbridge/intel/lynxpoint/usb_xhci.c
@@ -342,14 +342,14 @@
};
static const unsigned short pci_device_ids[] = {
- PCI_DEVICE_ID_INTEL_LPT_H_XHCI,
- PCI_DEVICE_ID_INTEL_LPT_LP_XHCI,
+ PCI_DID_INTEL_LPT_H_XHCI,
+ PCI_DID_INTEL_LPT_LP_XHCI,
0
};
static const struct pci_driver pch_usb_xhci __pci_driver = {
.ops = &usb_xhci_ops,
- .vendor = PCI_VENDOR_ID_INTEL,
+ .vendor = PCI_VID_INTEL,
.devices = pci_device_ids,
};
#endif /* !__SIMPLE_DEVICE__ */