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/soc/amd/cezanne/data_fabric.c b/src/soc/amd/cezanne/data_fabric.c
index f62532c..43894e9 100644
--- a/src/soc/amd/cezanne/data_fabric.c
+++ b/src/soc/amd/cezanne/data_fabric.c
@@ -101,29 +101,29 @@
static const char *data_fabric_acpi_name(const struct device *dev)
{
switch (dev->device) {
- case PCI_DEVICE_ID_AMD_FAM17H_MODEL60H_DF0:
- case PCI_DEVICE_ID_AMD_FAM19H_MODEL51H_DF0:
+ case PCI_DID_AMD_FAM17H_MODEL60H_DF0:
+ case PCI_DID_AMD_FAM19H_MODEL51H_DF0:
return "DFD0";
- case PCI_DEVICE_ID_AMD_FAM17H_MODEL60H_DF1:
- case PCI_DEVICE_ID_AMD_FAM19H_MODEL51H_DF1:
+ case PCI_DID_AMD_FAM17H_MODEL60H_DF1:
+ case PCI_DID_AMD_FAM19H_MODEL51H_DF1:
return "DFD1";
- case PCI_DEVICE_ID_AMD_FAM17H_MODEL60H_DF2:
- case PCI_DEVICE_ID_AMD_FAM19H_MODEL51H_DF2:
+ case PCI_DID_AMD_FAM17H_MODEL60H_DF2:
+ case PCI_DID_AMD_FAM19H_MODEL51H_DF2:
return "DFD2";
- case PCI_DEVICE_ID_AMD_FAM17H_MODEL60H_DF3:
- case PCI_DEVICE_ID_AMD_FAM19H_MODEL51H_DF3:
+ case PCI_DID_AMD_FAM17H_MODEL60H_DF3:
+ case PCI_DID_AMD_FAM19H_MODEL51H_DF3:
return "DFD3";
- case PCI_DEVICE_ID_AMD_FAM17H_MODEL60H_DF4:
- case PCI_DEVICE_ID_AMD_FAM19H_MODEL51H_DF4:
+ case PCI_DID_AMD_FAM17H_MODEL60H_DF4:
+ case PCI_DID_AMD_FAM19H_MODEL51H_DF4:
return "DFD4";
- case PCI_DEVICE_ID_AMD_FAM17H_MODEL60H_DF5:
- case PCI_DEVICE_ID_AMD_FAM19H_MODEL51H_DF5:
+ case PCI_DID_AMD_FAM17H_MODEL60H_DF5:
+ case PCI_DID_AMD_FAM19H_MODEL51H_DF5:
return "DFD5";
- case PCI_DEVICE_ID_AMD_FAM17H_MODEL60H_DF6:
- case PCI_DEVICE_ID_AMD_FAM19H_MODEL51H_DF6:
+ case PCI_DID_AMD_FAM17H_MODEL60H_DF6:
+ case PCI_DID_AMD_FAM19H_MODEL51H_DF6:
return "DFD6";
- case PCI_DEVICE_ID_AMD_FAM17H_MODEL60H_DF7:
- case PCI_DEVICE_ID_AMD_FAM19H_MODEL51H_DF7:
+ case PCI_DID_AMD_FAM17H_MODEL60H_DF7:
+ case PCI_DID_AMD_FAM19H_MODEL51H_DF7:
return "DFD7";
default:
printk(BIOS_ERR, "%s: Unhandled device id 0x%x\n", __func__, dev->device);
@@ -141,28 +141,28 @@
static const unsigned short pci_device_ids[] = {
/* Renoir DF devices */
- PCI_DEVICE_ID_AMD_FAM17H_MODEL60H_DF0,
- PCI_DEVICE_ID_AMD_FAM17H_MODEL60H_DF1,
- PCI_DEVICE_ID_AMD_FAM17H_MODEL60H_DF2,
- PCI_DEVICE_ID_AMD_FAM17H_MODEL60H_DF3,
- PCI_DEVICE_ID_AMD_FAM17H_MODEL60H_DF4,
- PCI_DEVICE_ID_AMD_FAM17H_MODEL60H_DF5,
- PCI_DEVICE_ID_AMD_FAM17H_MODEL60H_DF6,
- PCI_DEVICE_ID_AMD_FAM17H_MODEL60H_DF7,
+ PCI_DID_AMD_FAM17H_MODEL60H_DF0,
+ PCI_DID_AMD_FAM17H_MODEL60H_DF1,
+ PCI_DID_AMD_FAM17H_MODEL60H_DF2,
+ PCI_DID_AMD_FAM17H_MODEL60H_DF3,
+ PCI_DID_AMD_FAM17H_MODEL60H_DF4,
+ PCI_DID_AMD_FAM17H_MODEL60H_DF5,
+ PCI_DID_AMD_FAM17H_MODEL60H_DF6,
+ PCI_DID_AMD_FAM17H_MODEL60H_DF7,
/* Cezanne DF devices */
- PCI_DEVICE_ID_AMD_FAM19H_MODEL51H_DF0,
- PCI_DEVICE_ID_AMD_FAM19H_MODEL51H_DF1,
- PCI_DEVICE_ID_AMD_FAM19H_MODEL51H_DF2,
- PCI_DEVICE_ID_AMD_FAM19H_MODEL51H_DF3,
- PCI_DEVICE_ID_AMD_FAM19H_MODEL51H_DF4,
- PCI_DEVICE_ID_AMD_FAM19H_MODEL51H_DF5,
- PCI_DEVICE_ID_AMD_FAM19H_MODEL51H_DF6,
- PCI_DEVICE_ID_AMD_FAM19H_MODEL51H_DF7,
+ PCI_DID_AMD_FAM19H_MODEL51H_DF0,
+ PCI_DID_AMD_FAM19H_MODEL51H_DF1,
+ PCI_DID_AMD_FAM19H_MODEL51H_DF2,
+ PCI_DID_AMD_FAM19H_MODEL51H_DF3,
+ PCI_DID_AMD_FAM19H_MODEL51H_DF4,
+ PCI_DID_AMD_FAM19H_MODEL51H_DF5,
+ PCI_DID_AMD_FAM19H_MODEL51H_DF6,
+ PCI_DID_AMD_FAM19H_MODEL51H_DF7,
0
};
static const struct pci_driver data_fabric_driver __pci_driver = {
.ops = &data_fabric_ops,
- .vendor = PCI_VENDOR_ID_AMD,
+ .vendor = PCI_VID_AMD,
.devices = pci_device_ids,
};
diff --git a/src/soc/amd/cezanne/root_complex.c b/src/soc/amd/cezanne/root_complex.c
index 9cb668e..1381df3 100644
--- a/src/soc/amd/cezanne/root_complex.c
+++ b/src/soc/amd/cezanne/root_complex.c
@@ -225,6 +225,6 @@
static const struct pci_driver family17_root_complex __pci_driver = {
.ops = &root_complex_operations,
- .vendor = PCI_VENDOR_ID_AMD,
- .device = PCI_DEVICE_ID_AMD_17H_MODEL_606F_NB,
+ .vendor = PCI_VID_AMD,
+ .device = PCI_DID_AMD_17H_MODEL_606F_NB,
};
diff --git a/src/soc/amd/common/block/acp/acp.c b/src/soc/amd/common/block/acp/acp.c
index b9dfce2..cf0e9f8 100644
--- a/src/soc/amd/common/block/acp/acp.c
+++ b/src/soc/amd/common/block/acp/acp.c
@@ -55,6 +55,6 @@
static const struct pci_driver acp_driver __pci_driver = {
.ops = &acp_ops,
- .vendor = PCI_VENDOR_ID_AMD,
- .device = PCI_DEVICE_ID_AMD_FAM17H_ACP,
+ .vendor = PCI_VID_AMD,
+ .device = PCI_DID_AMD_FAM17H_ACP,
};
diff --git a/src/soc/amd/common/block/graphics/graphics.c b/src/soc/amd/common/block/graphics/graphics.c
index 38a422c..d39f60a 100644
--- a/src/soc/amd/common/block/graphics/graphics.c
+++ b/src/soc/amd/common/block/graphics/graphics.c
@@ -181,17 +181,17 @@
};
static const unsigned short pci_device_ids[] = {
- PCI_DEVICE_ID_ATI_FAM17H_MODEL18H_GPU,
- PCI_DEVICE_ID_ATI_FAM17H_MODEL60H_GPU,
- PCI_DEVICE_ID_ATI_FAM17H_MODEL68H_GPU,
- PCI_DEVICE_ID_ATI_FAM17H_MODELA0H_GPU,
- PCI_DEVICE_ID_ATI_FAM19H_MODEL51H_GPU_CEZANNE,
- PCI_DEVICE_ID_ATI_FAM19H_MODEL51H_GPU_BARCELO,
+ PCI_DID_ATI_FAM17H_MODEL18H_GPU,
+ PCI_DID_ATI_FAM17H_MODEL60H_GPU,
+ PCI_DID_ATI_FAM17H_MODEL68H_GPU,
+ PCI_DID_ATI_FAM17H_MODELA0H_GPU,
+ PCI_DID_ATI_FAM19H_MODEL51H_GPU_CEZANNE,
+ PCI_DID_ATI_FAM19H_MODEL51H_GPU_BARCELO,
0,
};
static const struct pci_driver graphics_driver __pci_driver = {
.ops = &graphics_ops,
- .vendor = PCI_VENDOR_ID_ATI,
+ .vendor = PCI_VID_ATI,
.devices = pci_device_ids,
};
diff --git a/src/soc/amd/common/block/hda/hda.c b/src/soc/amd/common/block/hda/hda.c
index 104bb9b..e8436ed 100644
--- a/src/soc/amd/common/block/hda/hda.c
+++ b/src/soc/amd/common/block/hda/hda.c
@@ -9,9 +9,9 @@
#include <device/azalia_device.h>
static const unsigned short pci_device_ids[] = {
- PCI_DEVICE_ID_AMD_SB900_HDA,
- PCI_DEVICE_ID_AMD_CZ_HDA,
- PCI_DEVICE_ID_AMD_FAM17H_HDA1,
+ PCI_DID_AMD_SB900_HDA,
+ PCI_DID_AMD_CZ_HDA,
+ PCI_DID_AMD_FAM17H_HDA1,
0
};
@@ -42,6 +42,6 @@
static const struct pci_driver hdaaudio_driver __pci_driver = {
.ops = CONFIG(AZALIA_PLUGIN_SUPPORT) ?
&default_azalia_audio_ops : &hda_audio_ops,
- .vendor = PCI_VENDOR_ID_AMD,
+ .vendor = PCI_VID_AMD,
.devices = pci_device_ids,
};
diff --git a/src/soc/amd/common/block/iommu/iommu.c b/src/soc/amd/common/block/iommu/iommu.c
index 9d4f38e..4f20dd4 100644
--- a/src/soc/amd/common/block/iommu/iommu.c
+++ b/src/soc/amd/common/block/iommu/iommu.c
@@ -39,16 +39,16 @@
};
static const unsigned short pci_device_ids[] = {
- PCI_DEVICE_ID_AMD_15H_MODEL_303F_NB_IOMMU,
- PCI_DEVICE_ID_AMD_15H_MODEL_707F_NB_IOMMU,
- PCI_DEVICE_ID_AMD_17H_MODEL_1020_NB_IOMMU,
- PCI_DEVICE_ID_AMD_17H_MODEL_606F_NB_IOMMU,
- PCI_DEVICE_ID_AMD_17H_MODEL_A0AF_NB_IOMMU,
+ PCI_DID_AMD_15H_MODEL_303F_NB_IOMMU,
+ PCI_DID_AMD_15H_MODEL_707F_NB_IOMMU,
+ PCI_DID_AMD_17H_MODEL_1020_NB_IOMMU,
+ PCI_DID_AMD_17H_MODEL_606F_NB_IOMMU,
+ PCI_DID_AMD_17H_MODEL_A0AF_NB_IOMMU,
0
};
static const struct pci_driver iommu_driver __pci_driver = {
.ops = &iommu_ops,
- .vendor = PCI_VENDOR_ID_AMD,
+ .vendor = PCI_VID_AMD,
.devices = pci_device_ids,
};
diff --git a/src/soc/amd/common/block/lpc/lpc.c b/src/soc/amd/common/block/lpc/lpc.c
index ebded6b..ee8f7e4 100644
--- a/src/soc/amd/common/block/lpc/lpc.c
+++ b/src/soc/amd/common/block/lpc/lpc.c
@@ -323,13 +323,13 @@
static const unsigned short pci_device_ids[] = {
/* PCI device ID is used on all discrete FCHs and Family 16h Models 00h-3Fh */
- PCI_DEVICE_ID_AMD_SB900_LPC,
+ PCI_DID_AMD_SB900_LPC,
/* PCI device ID is used on all integrated FCHs except Family 16h Models 00h-3Fh */
- PCI_DEVICE_ID_AMD_CZ_LPC,
+ PCI_DID_AMD_CZ_LPC,
0
};
static const struct pci_driver lpc_driver __pci_driver = {
.ops = &lpc_ops,
- .vendor = PCI_VENDOR_ID_AMD,
+ .vendor = PCI_VID_AMD,
.devices = pci_device_ids,
};
diff --git a/src/soc/amd/common/block/pci/pcie_gpp.c b/src/soc/amd/common/block/pci/pcie_gpp.c
index d48d49c..2e37935 100644
--- a/src/soc/amd/common/block/pci/pcie_gpp.c
+++ b/src/soc/amd/common/block/pci/pcie_gpp.c
@@ -59,16 +59,16 @@
};
static const unsigned short internal_pci_gpp_ids[] = {
- PCI_DEVICE_ID_AMD_FAM17H_MODEL18H_PCIE_GPP_BUSA,
- PCI_DEVICE_ID_AMD_FAM17H_MODEL18H_PCIE_GPP_BUSB,
- PCI_DEVICE_ID_AMD_FAM17H_MODEL60H_PCIE_GPP_BUSABC,
- PCI_DEVICE_ID_AMD_FAM17H_MODELA0H_PCIE_GPP_BUSABC,
+ PCI_DID_AMD_FAM17H_MODEL18H_PCIE_GPP_BUSA,
+ PCI_DID_AMD_FAM17H_MODEL18H_PCIE_GPP_BUSB,
+ PCI_DID_AMD_FAM17H_MODEL60H_PCIE_GPP_BUSABC,
+ PCI_DID_AMD_FAM17H_MODELA0H_PCIE_GPP_BUSABC,
0
};
static const struct pci_driver internal_pcie_gpp_driver __pci_driver = {
.ops = &internal_pcie_gpp_ops,
- .vendor = PCI_VENDOR_ID_AMD,
+ .vendor = PCI_VID_AMD,
.devices = internal_pci_gpp_ids,
};
@@ -83,15 +83,15 @@
};
static const unsigned short external_pci_gpp_ids[] = {
- PCI_DEVICE_ID_AMD_FAM17H_MODEL18H_PCIE_GPP,
- PCI_DEVICE_ID_AMD_FAM17H_MODEL60H_PCIE_GPP_D1,
- PCI_DEVICE_ID_AMD_FAM17H_MODEL60H_PCIE_GPP_D2,
- PCI_DEVICE_ID_AMD_FAM17H_MODELA0H_PCIE_GPP,
+ PCI_DID_AMD_FAM17H_MODEL18H_PCIE_GPP,
+ PCI_DID_AMD_FAM17H_MODEL60H_PCIE_GPP_D1,
+ PCI_DID_AMD_FAM17H_MODEL60H_PCIE_GPP_D2,
+ PCI_DID_AMD_FAM17H_MODELA0H_PCIE_GPP,
0
};
static const struct pci_driver external_pcie_gpp_driver __pci_driver = {
.ops = &external_pcie_gpp_ops,
- .vendor = PCI_VENDOR_ID_AMD,
+ .vendor = PCI_VID_AMD,
.devices = external_pci_gpp_ids,
};
diff --git a/src/soc/amd/common/block/sata/sata.c b/src/soc/amd/common/block/sata/sata.c
index 9caec89..19a7d3e 100644
--- a/src/soc/amd/common/block/sata/sata.c
+++ b/src/soc/amd/common/block/sata/sata.c
@@ -22,17 +22,17 @@
};
static const unsigned short pci_device_ids[] = {
- PCI_DEVICE_ID_AMD_CZ_SATA,
- PCI_DEVICE_ID_AMD_CZ_SATA_AHCI,
- PCI_DEVICE_ID_AMD_FAM17H_SATA_AHCI_VER0,
- PCI_DEVICE_ID_AMD_FAM17H_SATA_AHCI_VER1,
- PCI_DEVICE_ID_AMD_FAM17H_SATA_AHCI_RAID_VER0,
- PCI_DEVICE_ID_AMD_FAM17H_SATA_AHCI_RAID_VER1,
+ PCI_DID_AMD_CZ_SATA,
+ PCI_DID_AMD_CZ_SATA_AHCI,
+ PCI_DID_AMD_FAM17H_SATA_AHCI_VER0,
+ PCI_DID_AMD_FAM17H_SATA_AHCI_VER1,
+ PCI_DID_AMD_FAM17H_SATA_AHCI_RAID_VER0,
+ PCI_DID_AMD_FAM17H_SATA_AHCI_RAID_VER1,
0
};
static const struct pci_driver sata0_driver __pci_driver = {
.ops = &sata_ops,
- .vendor = PCI_VENDOR_ID_AMD,
+ .vendor = PCI_VID_AMD,
.devices = pci_device_ids,
};
diff --git a/src/soc/amd/common/block/smbus/sm.c b/src/soc/amd/common/block/smbus/sm.c
index ae2edc1..e8b7c0f 100644
--- a/src/soc/amd/common/block/smbus/sm.c
+++ b/src/soc/amd/common/block/smbus/sm.c
@@ -88,7 +88,7 @@
static const struct pci_driver smbus_driver __pci_driver = {
.ops = &smbus_ops,
- .vendor = PCI_VENDOR_ID_AMD,
+ .vendor = PCI_VID_AMD,
/* PCI device ID is used on all integrated FCHs except Family 16h Models 00h-3Fh */
- .device = PCI_DEVICE_ID_AMD_CZ_SMBUS,
+ .device = PCI_DID_AMD_CZ_SMBUS,
};
diff --git a/src/soc/amd/picasso/data_fabric.c b/src/soc/amd/picasso/data_fabric.c
index 75d72e9..50f75bc 100644
--- a/src/soc/amd/picasso/data_fabric.c
+++ b/src/soc/amd/picasso/data_fabric.c
@@ -101,21 +101,21 @@
static const char *data_fabric_acpi_name(const struct device *dev)
{
switch (dev->device) {
- case PCI_DEVICE_ID_AMD_FAM17H_MODEL18H_DF0:
+ case PCI_DID_AMD_FAM17H_MODEL18H_DF0:
return "DFD0";
- case PCI_DEVICE_ID_AMD_FAM17H_MODEL18H_DF1:
+ case PCI_DID_AMD_FAM17H_MODEL18H_DF1:
return "DFD1";
- case PCI_DEVICE_ID_AMD_FAM17H_MODEL18H_DF2:
+ case PCI_DID_AMD_FAM17H_MODEL18H_DF2:
return "DFD2";
- case PCI_DEVICE_ID_AMD_FAM17H_MODEL18H_DF3:
+ case PCI_DID_AMD_FAM17H_MODEL18H_DF3:
return "DFD3";
- case PCI_DEVICE_ID_AMD_FAM17H_MODEL18H_DF4:
+ case PCI_DID_AMD_FAM17H_MODEL18H_DF4:
return "DFD4";
- case PCI_DEVICE_ID_AMD_FAM17H_MODEL18H_DF5:
+ case PCI_DID_AMD_FAM17H_MODEL18H_DF5:
return "DFD5";
- case PCI_DEVICE_ID_AMD_FAM17H_MODEL18H_DF6:
+ case PCI_DID_AMD_FAM17H_MODEL18H_DF6:
return "DFD6";
- case PCI_DEVICE_ID_AMD_FAM17H_MODEL18H_DF7:
+ case PCI_DID_AMD_FAM17H_MODEL18H_DF7:
return "DFD7";
default:
printk(BIOS_ERR, "%s: Unhandled device id 0x%x\n", __func__, dev->device);
@@ -132,19 +132,19 @@
};
static const unsigned short pci_device_ids[] = {
- PCI_DEVICE_ID_AMD_FAM17H_MODEL18H_DF0,
- PCI_DEVICE_ID_AMD_FAM17H_MODEL18H_DF1,
- PCI_DEVICE_ID_AMD_FAM17H_MODEL18H_DF2,
- PCI_DEVICE_ID_AMD_FAM17H_MODEL18H_DF3,
- PCI_DEVICE_ID_AMD_FAM17H_MODEL18H_DF4,
- PCI_DEVICE_ID_AMD_FAM17H_MODEL18H_DF5,
- PCI_DEVICE_ID_AMD_FAM17H_MODEL18H_DF6,
- PCI_DEVICE_ID_AMD_FAM17H_MODEL18H_DF7,
+ PCI_DID_AMD_FAM17H_MODEL18H_DF0,
+ PCI_DID_AMD_FAM17H_MODEL18H_DF1,
+ PCI_DID_AMD_FAM17H_MODEL18H_DF2,
+ PCI_DID_AMD_FAM17H_MODEL18H_DF3,
+ PCI_DID_AMD_FAM17H_MODEL18H_DF4,
+ PCI_DID_AMD_FAM17H_MODEL18H_DF5,
+ PCI_DID_AMD_FAM17H_MODEL18H_DF6,
+ PCI_DID_AMD_FAM17H_MODEL18H_DF7,
0
};
static const struct pci_driver data_fabric_driver __pci_driver = {
.ops = &data_fabric_ops,
- .vendor = PCI_VENDOR_ID_AMD,
+ .vendor = PCI_VID_AMD,
.devices = pci_device_ids,
};
diff --git a/src/soc/amd/picasso/root_complex.c b/src/soc/amd/picasso/root_complex.c
index d5fd10d..73a50a9 100644
--- a/src/soc/amd/picasso/root_complex.c
+++ b/src/soc/amd/picasso/root_complex.c
@@ -223,6 +223,6 @@
static const struct pci_driver family17_root_complex __pci_driver = {
.ops = &root_complex_operations,
- .vendor = PCI_VENDOR_ID_AMD,
- .device = PCI_DEVICE_ID_AMD_17H_MODEL_101F_NB,
+ .vendor = PCI_VID_AMD,
+ .device = PCI_DID_AMD_17H_MODEL_101F_NB,
};
diff --git a/src/soc/amd/sabrina/data_fabric.c b/src/soc/amd/sabrina/data_fabric.c
index 8f821c3..0a39959 100644
--- a/src/soc/amd/sabrina/data_fabric.c
+++ b/src/soc/amd/sabrina/data_fabric.c
@@ -104,21 +104,21 @@
static const char *data_fabric_acpi_name(const struct device *dev)
{
switch (dev->device) {
- case PCI_DEVICE_ID_AMD_FAM17H_MODELA0H_DF0:
+ case PCI_DID_AMD_FAM17H_MODELA0H_DF0:
return "DFD0";
- case PCI_DEVICE_ID_AMD_FAM17H_MODELA0H_DF1:
+ case PCI_DID_AMD_FAM17H_MODELA0H_DF1:
return "DFD1";
- case PCI_DEVICE_ID_AMD_FAM17H_MODELA0H_DF2:
+ case PCI_DID_AMD_FAM17H_MODELA0H_DF2:
return "DFD2";
- case PCI_DEVICE_ID_AMD_FAM17H_MODELA0H_DF3:
+ case PCI_DID_AMD_FAM17H_MODELA0H_DF3:
return "DFD3";
- case PCI_DEVICE_ID_AMD_FAM17H_MODELA0H_DF4:
+ case PCI_DID_AMD_FAM17H_MODELA0H_DF4:
return "DFD4";
- case PCI_DEVICE_ID_AMD_FAM17H_MODELA0H_DF5:
+ case PCI_DID_AMD_FAM17H_MODELA0H_DF5:
return "DFD5";
- case PCI_DEVICE_ID_AMD_FAM17H_MODELA0H_DF6:
+ case PCI_DID_AMD_FAM17H_MODELA0H_DF6:
return "DFD6";
- case PCI_DEVICE_ID_AMD_FAM17H_MODELA0H_DF7:
+ case PCI_DID_AMD_FAM17H_MODELA0H_DF7:
return "DFD7";
default:
printk(BIOS_ERR, "%s: Unhandled device id 0x%x\n", __func__, dev->device);
@@ -135,19 +135,19 @@
};
static const unsigned short pci_device_ids[] = {
- PCI_DEVICE_ID_AMD_FAM17H_MODELA0H_DF0,
- PCI_DEVICE_ID_AMD_FAM17H_MODELA0H_DF1,
- PCI_DEVICE_ID_AMD_FAM17H_MODELA0H_DF2,
- PCI_DEVICE_ID_AMD_FAM17H_MODELA0H_DF3,
- PCI_DEVICE_ID_AMD_FAM17H_MODELA0H_DF4,
- PCI_DEVICE_ID_AMD_FAM17H_MODELA0H_DF5,
- PCI_DEVICE_ID_AMD_FAM17H_MODELA0H_DF6,
- PCI_DEVICE_ID_AMD_FAM17H_MODELA0H_DF7,
+ PCI_DID_AMD_FAM17H_MODELA0H_DF0,
+ PCI_DID_AMD_FAM17H_MODELA0H_DF1,
+ PCI_DID_AMD_FAM17H_MODELA0H_DF2,
+ PCI_DID_AMD_FAM17H_MODELA0H_DF3,
+ PCI_DID_AMD_FAM17H_MODELA0H_DF4,
+ PCI_DID_AMD_FAM17H_MODELA0H_DF5,
+ PCI_DID_AMD_FAM17H_MODELA0H_DF6,
+ PCI_DID_AMD_FAM17H_MODELA0H_DF7,
0
};
static const struct pci_driver data_fabric_driver __pci_driver = {
.ops = &data_fabric_ops,
- .vendor = PCI_VENDOR_ID_AMD,
+ .vendor = PCI_VID_AMD,
.devices = pci_device_ids,
};
diff --git a/src/soc/amd/sabrina/root_complex.c b/src/soc/amd/sabrina/root_complex.c
index ae1b3b9..8f91b2a 100644
--- a/src/soc/amd/sabrina/root_complex.c
+++ b/src/soc/amd/sabrina/root_complex.c
@@ -227,6 +227,6 @@
static const struct pci_driver family17_root_complex __pci_driver = {
.ops = &root_complex_operations,
- .vendor = PCI_VENDOR_ID_AMD,
- .device = PCI_DEVICE_ID_AMD_17H_MODEL_A0AF_NB,
+ .vendor = PCI_VID_AMD,
+ .device = PCI_DID_AMD_17H_MODEL_A0AF_NB,
};
diff --git a/src/soc/amd/sabrina/xhci.c b/src/soc/amd/sabrina/xhci.c
index c6c0545..fdd0118 100644
--- a/src/soc/amd/sabrina/xhci.c
+++ b/src/soc/amd/sabrina/xhci.c
@@ -50,7 +50,7 @@
}
} else if (dev->bus->dev->path.pci.devfn == PCIE_GPP_C_DEVFN) {
if (dev->path.pci.devfn == XHCI2_DEVFN
- && dev->device == PCI_DEVICE_ID_AMD_FAM17H_MODELA0H_XHCI2) {
+ && dev->device == PCI_DID_AMD_FAM17H_MODELA0H_XHCI2) {
*gpe = xhci_sci_sources[2].gpe;
return CB_SUCCESS;
}
@@ -62,7 +62,7 @@
static void configure_xhci_sci(void *unused)
{
const struct device *xhci_2 = DEV_PTR(xhci_2);
- if (xhci_2->device == PCI_DEVICE_ID_AMD_FAM17H_MODELA0H_XHCI2)
+ if (xhci_2->device == PCI_DID_AMD_FAM17H_MODELA0H_XHCI2)
gpe_configure_sci(xhci_sci_sources, ARRAY_SIZE(xhci_sci_sources));
else
gpe_configure_sci(xhci_sci_sources, ARRAY_SIZE(xhci_sci_sources) - 1);
diff --git a/src/soc/amd/stoneyridge/include/soc/pci_devs.h b/src/soc/amd/stoneyridge/include/soc/pci_devs.h
index 4e5c8fc..e639fe6 100644
--- a/src/soc/amd/stoneyridge/include/soc/pci_devs.h
+++ b/src/soc/amd/stoneyridge/include/soc/pci_devs.h
@@ -21,8 +21,8 @@
/*
* Internal Graphics
* Device IDs subject to SKU/OPN variation
- * GFX_DEVID for merlinfalcon PCI_DEVICE_ID_AMD_15H_MODEL_606F_GFX
- * GFX_DEVID for stoneyridge PCI_DEVICE_ID_AMD_15H_MODEL_707F_GFX
+ * GFX_DEVID for merlinfalcon PCI_DID_AMD_15H_MODEL_606F_GFX
+ * GFX_DEVID for stoneyridge PCI_DID_AMD_15H_MODEL_707F_GFX
*/
#define GFX_DEV 0x1
#define GFX_FUNC 0
@@ -31,8 +31,8 @@
/* HD Audio 0
* Device IDs
- * HDA0_DEVID PCI_DEVICE_ID_AMD_15H_MODEL_606F_HDA
- * HDA0_DEVID PCI_DEVICE_ID_AMD_15H_MODEL_707F_HDA
+ * HDA0_DEVID PCI_DID_AMD_15H_MODEL_606F_HDA
+ * HDA0_DEVID PCI_DID_AMD_15H_MODEL_707F_HDA
*/
#define HDA0_DEV 0x1
#define HDA0_FUNC 1
@@ -89,8 +89,8 @@
/* HT Configuration
* Device IDs
- * HT_DEVID for merlinfalcon PCI_DEVICE_ID_AMD_15H_MODEL_606F_NB_HT
- * HT_DEVID for stoneyridge PCI_DEVICE_ID_AMD_15H_MODEL_707F_NB_HT
+ * HT_DEVID for merlinfalcon PCI_DID_AMD_15H_MODEL_606F_NB_HT
+ * HT_DEVID for stoneyridge PCI_DID_AMD_15H_MODEL_707F_NB_HT
*/
#define HT_DEV 0x18
#define HT_FUNC 0
diff --git a/src/soc/amd/stoneyridge/northbridge.c b/src/soc/amd/stoneyridge/northbridge.c
index 85ef19e..2166ef4 100644
--- a/src/soc/amd/stoneyridge/northbridge.c
+++ b/src/soc/amd/stoneyridge/northbridge.c
@@ -320,13 +320,13 @@
};
static const unsigned short pci_device_ids[] = {
- PCI_DEVICE_ID_AMD_15H_MODEL_606F_NB_HT,
- PCI_DEVICE_ID_AMD_15H_MODEL_707F_NB_HT,
+ PCI_DID_AMD_15H_MODEL_606F_NB_HT,
+ PCI_DID_AMD_15H_MODEL_707F_NB_HT,
0 };
static const struct pci_driver family15_northbridge __pci_driver = {
.ops = &northbridge_operations,
- .vendor = PCI_VENDOR_ID_AMD,
+ .vendor = PCI_VID_AMD,
.devices = pci_device_ids,
};
diff --git a/src/soc/amd/stoneyridge/usb.c b/src/soc/amd/stoneyridge/usb.c
index c83f1e1..efb50cd 100644
--- a/src/soc/amd/stoneyridge/usb.c
+++ b/src/soc/amd/stoneyridge/usb.c
@@ -52,17 +52,17 @@
};
static const unsigned short pci_device_ids[] = {
- PCI_DEVICE_ID_AMD_SB900_USB_18_0,
- PCI_DEVICE_ID_AMD_SB900_USB_18_2,
- PCI_DEVICE_ID_AMD_SB900_USB_20_5,
- PCI_DEVICE_ID_AMD_CZ_USB_0,
- PCI_DEVICE_ID_AMD_CZ_USB_1,
- PCI_DEVICE_ID_AMD_CZ_USB3_0,
+ PCI_DID_AMD_SB900_USB_18_0,
+ PCI_DID_AMD_SB900_USB_18_2,
+ PCI_DID_AMD_SB900_USB_20_5,
+ PCI_DID_AMD_CZ_USB_0,
+ PCI_DID_AMD_CZ_USB_1,
+ PCI_DID_AMD_CZ_USB3_0,
0
};
static const struct pci_driver usb_0_driver __pci_driver = {
.ops = &usb_ops,
- .vendor = PCI_VENDOR_ID_AMD,
+ .vendor = PCI_VID_AMD,
.devices = pci_device_ids,
};