summaryrefslogtreecommitdiff
path: root/src/southbridge/amd/agesa
diff options
context:
space:
mode:
authorFelix Singer <felixsinger@posteo.net>2022-03-07 04:34:52 +0100
committerFelix Singer <felixsinger@posteo.net>2022-03-07 08:32:09 +0000
commit43b7f416783ccc98952a4eb5f9274907442b03e5 (patch)
tree86a45336e809bee5d2891f2be9cf00184da9bb18 /src/southbridge/amd/agesa
parent2c423441c054d7a8c93cc814b9db5f8f7185bd0f (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/southbridge/amd/agesa')
-rw-r--r--src/southbridge/amd/agesa/hudson/hda.c4
-rw-r--r--src/southbridge/amd/agesa/hudson/hudson.c7
-rw-r--r--src/southbridge/amd/agesa/hudson/ide.c4
-rw-r--r--src/southbridge/amd/agesa/hudson/lpc.c4
-rw-r--r--src/southbridge/amd/agesa/hudson/pci.c4
-rw-r--r--src/southbridge/amd/agesa/hudson/pcie.c16
-rw-r--r--src/southbridge/amd/agesa/hudson/sata.c8
-rw-r--r--src/southbridge/amd/agesa/hudson/sd.c4
-rw-r--r--src/southbridge/amd/agesa/hudson/sm.c4
-rw-r--r--src/southbridge/amd/agesa/hudson/usb.c12
10 files changed, 33 insertions, 34 deletions
diff --git a/src/southbridge/amd/agesa/hudson/hda.c b/src/southbridge/amd/agesa/hudson/hda.c
index a15b045ab8..a63d52a8d2 100644
--- a/src/southbridge/amd/agesa/hudson/hda.c
+++ b/src/southbridge/amd/agesa/hudson/hda.c
@@ -20,6 +20,6 @@ static struct device_operations hda_audio_ops = {
static const struct pci_driver hdaaudio_driver __pci_driver = {
.ops = &hda_audio_ops,
- .vendor = PCI_VENDOR_ID_AMD,
- .device = PCI_DEVICE_ID_AMD_SB900_HDA,
+ .vendor = PCI_VID_AMD,
+ .device = PCI_DID_AMD_SB900_HDA,
};
diff --git a/src/southbridge/amd/agesa/hudson/hudson.c b/src/southbridge/amd/agesa/hudson/hudson.c
index 3c34e98d4d..f95b2fb488 100644
--- a/src/southbridge/amd/agesa/hudson/hudson.c
+++ b/src/southbridge/amd/agesa/hudson/hudson.c
@@ -44,7 +44,7 @@ void hudson_enable(struct device *dev)
if (dev->enabled == 0) {
u32 usb_device_id = pci_read_config16(dev, PCI_DEVICE_ID);
u8 reg8;
- if (usb_device_id == PCI_DEVICE_ID_AMD_SB900_USB_20_5) {
+ if (usb_device_id == PCI_DID_AMD_SB900_USB_20_5) {
/* turn off and remove device 0:14.5 from PCI space */
reg8 = pm_read8(0xef);
reg8 &= ~(1 << 6);
@@ -58,12 +58,11 @@ void hudson_enable(struct device *dev)
u32 sd_device_id = pci_read_config16(dev, PCI_DEVICE_ID);
/* turn off the SDHC controller in the PM reg */
u8 reg8;
- if (sd_device_id == PCI_DEVICE_ID_AMD_HUDSON_SD) {
+ if (sd_device_id == PCI_DID_AMD_HUDSON_SD) {
reg8 = pm_read8(0xe7);
reg8 &= ~(1 << 0);
pm_write8(0xe7, reg8);
- }
- else if (sd_device_id == PCI_DEVICE_ID_AMD_YANGTZE_SD) {
+ } else if (sd_device_id == PCI_DID_AMD_YANGTZE_SD) {
reg8 = pm_read8(0xe8);
reg8 &= ~(1 << 0);
pm_write8(0xe8, reg8);
diff --git a/src/southbridge/amd/agesa/hudson/ide.c b/src/southbridge/amd/agesa/hudson/ide.c
index 8ba7a12c1c..eaf40b5888 100644
--- a/src/southbridge/amd/agesa/hudson/ide.c
+++ b/src/southbridge/amd/agesa/hudson/ide.c
@@ -19,6 +19,6 @@ static struct device_operations ide_ops = {
static const struct pci_driver ide_driver __pci_driver = {
.ops = &ide_ops,
- .vendor = PCI_VENDOR_ID_AMD,
- .device = PCI_DEVICE_ID_AMD_SB900_IDE,
+ .vendor = PCI_VID_AMD,
+ .device = PCI_DID_AMD_SB900_IDE,
};
diff --git a/src/southbridge/amd/agesa/hudson/lpc.c b/src/southbridge/amd/agesa/hudson/lpc.c
index 6a31fbfbf8..8010f01212 100644
--- a/src/southbridge/amd/agesa/hudson/lpc.c
+++ b/src/southbridge/amd/agesa/hudson/lpc.c
@@ -343,6 +343,6 @@ static struct device_operations lpc_ops = {
};
static const struct pci_driver lpc_driver __pci_driver = {
.ops = &lpc_ops,
- .vendor = PCI_VENDOR_ID_AMD,
- .device = PCI_DEVICE_ID_AMD_SB900_LPC,
+ .vendor = PCI_VID_AMD,
+ .device = PCI_DID_AMD_SB900_LPC,
};
diff --git a/src/southbridge/amd/agesa/hudson/pci.c b/src/southbridge/amd/agesa/hudson/pci.c
index 5e828f7059..b99413c9c4 100644
--- a/src/southbridge/amd/agesa/hudson/pci.c
+++ b/src/southbridge/amd/agesa/hudson/pci.c
@@ -41,6 +41,6 @@ static struct device_operations pci_ops = {
static const struct pci_driver pci_driver __pci_driver = {
.ops = &pci_ops,
- .vendor = PCI_VENDOR_ID_AMD,
- .device = PCI_DEVICE_ID_AMD_SB900_PCI,
+ .vendor = PCI_VID_AMD,
+ .device = PCI_DID_AMD_SB900_PCI,
};
diff --git a/src/southbridge/amd/agesa/hudson/pcie.c b/src/southbridge/amd/agesa/hudson/pcie.c
index d79dbb922f..04827a44df 100644
--- a/src/southbridge/amd/agesa/hudson/pcie.c
+++ b/src/southbridge/amd/agesa/hudson/pcie.c
@@ -25,22 +25,22 @@ static struct device_operations pci_ops = {
static const struct pci_driver pciea_driver __pci_driver = {
.ops = &pci_ops,
- .vendor = PCI_VENDOR_ID_AMD,
- .device = PCI_DEVICE_ID_AMD_SB900_PCIEA,
+ .vendor = PCI_VID_AMD,
+ .device = PCI_DID_AMD_SB900_PCIEA,
};
static const struct pci_driver pcieb_driver __pci_driver = {
.ops = &pci_ops,
- .vendor = PCI_VENDOR_ID_AMD,
- .device = PCI_DEVICE_ID_AMD_SB900_PCIEB,
+ .vendor = PCI_VID_AMD,
+ .device = PCI_DID_AMD_SB900_PCIEB,
};
static const struct pci_driver pciec_driver __pci_driver = {
.ops = &pci_ops,
- .vendor = PCI_VENDOR_ID_AMD,
- .device = PCI_DEVICE_ID_AMD_SB900_PCIEC,
+ .vendor = PCI_VID_AMD,
+ .device = PCI_DID_AMD_SB900_PCIEC,
};
static const struct pci_driver pcied_driver __pci_driver = {
.ops = &pci_ops,
- .vendor = PCI_VENDOR_ID_AMD,
- .device = PCI_DEVICE_ID_AMD_SB900_PCIED,
+ .vendor = PCI_VID_AMD,
+ .device = PCI_DID_AMD_SB900_PCIED,
};
diff --git a/src/southbridge/amd/agesa/hudson/sata.c b/src/southbridge/amd/agesa/hudson/sata.c
index a8d3865020..c2348a963d 100644
--- a/src/southbridge/amd/agesa/hudson/sata.c
+++ b/src/southbridge/amd/agesa/hudson/sata.c
@@ -53,12 +53,12 @@ static struct device_operations sata_ops = {
static const struct pci_driver sata0_driver __pci_driver = {
.ops = &sata_ops,
- .vendor = PCI_VENDOR_ID_AMD,
- .device = PCI_DEVICE_ID_AMD_SB900_SATA,
+ .vendor = PCI_VID_AMD,
+ .device = PCI_DID_AMD_SB900_SATA,
};
static const struct pci_driver sata0_driver_ahci __pci_driver = {
.ops = &sata_ops,
- .vendor = PCI_VENDOR_ID_AMD,
- .device = PCI_DEVICE_ID_AMD_SB900_SATA_AHCI,
+ .vendor = PCI_VID_AMD,
+ .device = PCI_DID_AMD_SB900_SATA_AHCI,
};
diff --git a/src/southbridge/amd/agesa/hudson/sd.c b/src/southbridge/amd/agesa/hudson/sd.c
index f07a2e77ee..f3ea0a5eb4 100644
--- a/src/southbridge/amd/agesa/hudson/sd.c
+++ b/src/southbridge/amd/agesa/hudson/sd.c
@@ -46,6 +46,6 @@ static struct device_operations sd_ops = {
static const struct pci_driver sd_driver __pci_driver = {
.ops = &sd_ops,
- .vendor = PCI_VENDOR_ID_AMD,
- .device = PCI_DEVICE_ID_AMD_YANGTZE_SD,
+ .vendor = PCI_VID_AMD,
+ .device = PCI_DID_AMD_YANGTZE_SD,
};
diff --git a/src/southbridge/amd/agesa/hudson/sm.c b/src/southbridge/amd/agesa/hudson/sm.c
index 6f9e03c2d3..8fd124a5a3 100644
--- a/src/southbridge/amd/agesa/hudson/sm.c
+++ b/src/southbridge/amd/agesa/hudson/sm.c
@@ -105,6 +105,6 @@ static struct device_operations smbus_ops = {
};
static const struct pci_driver smbus_driver __pci_driver = {
.ops = &smbus_ops,
- .vendor = PCI_VENDOR_ID_AMD,
- .device = PCI_DEVICE_ID_AMD_SB900_SM,
+ .vendor = PCI_VID_AMD,
+ .device = PCI_DID_AMD_SB900_SM,
};
diff --git a/src/southbridge/amd/agesa/hudson/usb.c b/src/southbridge/amd/agesa/hudson/usb.c
index 1175f081aa..694f2bfd77 100644
--- a/src/southbridge/amd/agesa/hudson/usb.c
+++ b/src/southbridge/amd/agesa/hudson/usb.c
@@ -20,18 +20,18 @@ static struct device_operations usb_ops = {
static const struct pci_driver usb_0_driver __pci_driver = {
.ops = &usb_ops,
- .vendor = PCI_VENDOR_ID_AMD,
- .device = PCI_DEVICE_ID_AMD_SB900_USB_18_0,
+ .vendor = PCI_VID_AMD,
+ .device = PCI_DID_AMD_SB900_USB_18_0,
};
static const struct pci_driver usb_1_driver __pci_driver = {
.ops = &usb_ops,
- .vendor = PCI_VENDOR_ID_AMD,
- .device = PCI_DEVICE_ID_AMD_SB900_USB_18_2,
+ .vendor = PCI_VID_AMD,
+ .device = PCI_DID_AMD_SB900_USB_18_2,
};
static const struct pci_driver usb_4_driver __pci_driver = {
.ops = &usb_ops,
- .vendor = PCI_VENDOR_ID_AMD,
- .device = PCI_DEVICE_ID_AMD_SB900_USB_20_5,
+ .vendor = PCI_VID_AMD,
+ .device = PCI_DID_AMD_SB900_USB_20_5,
};