From 7f8b0cd89c10621f456e3eebcd290d3946122d6d Mon Sep 17 00:00:00 2001 From: Felix Singer Date: Sun, 10 Nov 2019 11:04:08 +0100 Subject: sb/i82801ix: Use macros instead of hard-coded IDs This patch replaces hard-coded PCI IDs with macros from pci_ids.h and cleans up some code. Change-Id: Ie6ea72ac49eb015ef5cbaa98ed2b3400072000b5 Signed-off-by: Felix Singer Reviewed-on: https://review.coreboot.org/c/coreboot/+/36705 Reviewed-by: Arthur Heymans Reviewed-by: HAOUAS Elyes Tested-by: build bot (Jenkins) --- src/southbridge/intel/i82801ix/sata.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/southbridge/intel/i82801ix/sata.c') diff --git a/src/southbridge/intel/i82801ix/sata.c b/src/southbridge/intel/i82801ix/sata.c index fa6c1df6b3..fcf4045baf 100644 --- a/src/southbridge/intel/i82801ix/sata.c +++ b/src/southbridge/intel/i82801ix/sata.c @@ -155,7 +155,8 @@ static void sata_init(struct device *const dev) const config_t *const config = dev->chip_info; const u16 devid = pci_read_config16(dev, PCI_DEVICE_ID); - const int is_mobile = (devid == 0x2928) || (devid == 0x2929); + const int is_mobile = (devid == PCI_DEVICE_ID_INTEL_82801IBM_IEM_SATA_IDE_P01) || + (devid == PCI_DEVICE_ID_INTEL_82801IBM_IEM_SATA_AHCI_P0145); u8 sata_mode; printk(BIOS_DEBUG, "i82801ix_sata: initializing...\n"); @@ -276,8 +277,12 @@ static struct device_operations sata_ops = { }; static const unsigned short pci_device_ids[] = { - 0x2920, 0x2921, 0x2922, 0x2923, - 0x2928, 0x2929, + PCI_DEVICE_ID_INTEL_82801IB_SATA_P0123, + PCI_DEVICE_ID_INTEL_82801IB_SATA_P01, + PCI_DEVICE_ID_INTEL_82801IB_SATA_AHCI1, + PCI_DEVICE_ID_INTEL_82801IB_SATA_AHCI2, + PCI_DEVICE_ID_INTEL_82801IBM_IEM_SATA_IDE_P01, + PCI_DEVICE_ID_INTEL_82801IBM_IEM_SATA_AHCI_P0145, 0, }; -- cgit v1.2.3