aboutsummaryrefslogtreecommitdiff
path: root/src/southbridge/intel/i82801ix/sata.c
diff options
context:
space:
mode:
authorFelix Singer <felix.singer@9elements.com>2019-11-10 11:04:08 +0100
committerPatrick Georgi <pgeorgi@google.com>2019-11-22 10:47:43 +0000
commit7f8b0cd89c10621f456e3eebcd290d3946122d6d (patch)
tree018baa84262893975bd353807594d0d7f4052a4f /src/southbridge/intel/i82801ix/sata.c
parent94146009a190383a581618fd969bf2276fb73585 (diff)
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 <felix.singer@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36705 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/southbridge/intel/i82801ix/sata.c')
-rw-r--r--src/southbridge/intel/i82801ix/sata.c11
1 files changed, 8 insertions, 3 deletions
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,
};