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/southbridge/amd/pi/hudson | |
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/southbridge/amd/pi/hudson')
-rw-r--r-- | src/southbridge/amd/pi/hudson/hda.c | 6 | ||||
-rw-r--r-- | src/southbridge/amd/pi/hudson/hudson.c | 5 | ||||
-rw-r--r-- | src/southbridge/amd/pi/hudson/ide.c | 4 | ||||
-rw-r--r-- | src/southbridge/amd/pi/hudson/lpc.c | 6 | ||||
-rw-r--r-- | src/southbridge/amd/pi/hudson/pci.c | 4 | ||||
-rw-r--r-- | src/southbridge/amd/pi/hudson/pcie.c | 16 | ||||
-rw-r--r-- | src/southbridge/amd/pi/hudson/sata.c | 10 | ||||
-rw-r--r-- | src/southbridge/amd/pi/hudson/sd.c | 4 | ||||
-rw-r--r-- | src/southbridge/amd/pi/hudson/sm.c | 4 | ||||
-rw-r--r-- | src/southbridge/amd/pi/hudson/usb.c | 14 |
10 files changed, 36 insertions, 37 deletions
diff --git a/src/southbridge/amd/pi/hudson/hda.c b/src/southbridge/amd/pi/hudson/hda.c index f11eee5d98..196c5acb26 100644 --- a/src/southbridge/amd/pi/hudson/hda.c +++ b/src/southbridge/amd/pi/hudson/hda.c @@ -7,8 +7,8 @@ #include "hudson.h" static const unsigned short pci_device_ids[] = { - PCI_DEVICE_ID_AMD_SB900_HDA, - PCI_DEVICE_ID_AMD_CZ_HDA, + PCI_DID_AMD_SB900_HDA, + PCI_DID_AMD_CZ_HDA, 0 }; @@ -26,6 +26,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, + .vendor = PCI_VID_AMD, .devices = pci_device_ids, }; diff --git a/src/southbridge/amd/pi/hudson/hudson.c b/src/southbridge/amd/pi/hudson/hudson.c index 852144b2db..e9b26e0ad0 100644 --- a/src/southbridge/amd/pi/hudson/hudson.c +++ b/src/southbridge/amd/pi/hudson/hudson.c @@ -33,12 +33,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(PM_HUD_SD_FLASH_CTRL); reg8 &= ~BIT(0); pm_write8(PM_HUD_SD_FLASH_CTRL, 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(PM_YANG_SD_FLASH_CTRL); reg8 &= ~BIT(0); pm_write8(PM_YANG_SD_FLASH_CTRL, reg8); diff --git a/src/southbridge/amd/pi/hudson/ide.c b/src/southbridge/amd/pi/hudson/ide.c index 8ba7a12c1c..eaf40b5888 100644 --- a/src/southbridge/amd/pi/hudson/ide.c +++ b/src/southbridge/amd/pi/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/pi/hudson/lpc.c b/src/southbridge/amd/pi/hudson/lpc.c index 05543cfe59..df1f093a23 100644 --- a/src/southbridge/amd/pi/hudson/lpc.c +++ b/src/southbridge/amd/pi/hudson/lpc.c @@ -355,13 +355,13 @@ static struct device_operations lpc_ops = { 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/southbridge/amd/pi/hudson/pci.c b/src/southbridge/amd/pi/hudson/pci.c index 5e828f7059..b99413c9c4 100644 --- a/src/southbridge/amd/pi/hudson/pci.c +++ b/src/southbridge/amd/pi/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/pi/hudson/pcie.c b/src/southbridge/amd/pi/hudson/pcie.c index d79dbb922f..04827a44df 100644 --- a/src/southbridge/amd/pi/hudson/pcie.c +++ b/src/southbridge/amd/pi/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/pi/hudson/sata.c b/src/southbridge/amd/pi/hudson/sata.c index b05f8a0b68..dd1e1824b5 100644 --- a/src/southbridge/amd/pi/hudson/sata.c +++ b/src/southbridge/amd/pi/hudson/sata.c @@ -52,15 +52,15 @@ static struct device_operations sata_ops = { }; static const unsigned short pci_device_ids[] = { - PCI_DEVICE_ID_AMD_SB900_SATA, - PCI_DEVICE_ID_AMD_SB900_SATA_AHCI, - PCI_DEVICE_ID_AMD_CZ_SATA, - PCI_DEVICE_ID_AMD_CZ_SATA_AHCI, + PCI_DID_AMD_SB900_SATA, + PCI_DID_AMD_SB900_SATA_AHCI, + PCI_DID_AMD_CZ_SATA, + PCI_DID_AMD_CZ_SATA_AHCI, 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/southbridge/amd/pi/hudson/sd.c b/src/southbridge/amd/pi/hudson/sd.c index 9235500138..6dad334991 100644 --- a/src/southbridge/amd/pi/hudson/sd.c +++ b/src/southbridge/amd/pi/hudson/sd.c @@ -47,6 +47,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/pi/hudson/sm.c b/src/southbridge/amd/pi/hudson/sm.c index f6422cf37e..79d1005997 100644 --- a/src/southbridge/amd/pi/hudson/sm.c +++ b/src/southbridge/amd/pi/hudson/sm.c @@ -105,7 +105,7 @@ static struct device_operations smbus_ops = { }; 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 discrete FCHs and Family 16h Models 00h-3Fh */ - .device = PCI_DEVICE_ID_AMD_SB900_SM, + .device = PCI_DID_AMD_SB900_SM, }; diff --git a/src/southbridge/amd/pi/hudson/usb.c b/src/southbridge/amd/pi/hudson/usb.c index fecae7467e..04b4d920ca 100644 --- a/src/southbridge/amd/pi/hudson/usb.c +++ b/src/southbridge/amd/pi/hudson/usb.c @@ -19,17 +19,17 @@ static struct device_operations usb_ops = { }; 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, }; |