diff options
author | Felix Singer <felix.singer@9elements.com> | 2019-11-10 11:04:08 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-11-22 10:47:43 +0000 |
commit | 7f8b0cd89c10621f456e3eebcd290d3946122d6d (patch) | |
tree | 018baa84262893975bd353807594d0d7f4052a4f /src/southbridge/intel/i82801ix/early_smbus.c | |
parent | 94146009a190383a581618fd969bf2276fb73585 (diff) | |
download | coreboot-7f8b0cd89c10621f456e3eebcd290d3946122d6d.tar.xz |
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/early_smbus.c')
-rw-r--r-- | src/southbridge/intel/i82801ix/early_smbus.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/southbridge/intel/i82801ix/early_smbus.c b/src/southbridge/intel/i82801ix/early_smbus.c index 54ad3c369b..e686d48127 100644 --- a/src/southbridge/intel/i82801ix/early_smbus.c +++ b/src/southbridge/intel/i82801ix/early_smbus.c @@ -19,6 +19,7 @@ #include <device/pci_ops.h> #include <console/console.h> #include <device/pci_def.h> +#include <device/pci_ids.h> #include <southbridge/intel/common/smbus.h> #include "i82801ix.h" @@ -30,9 +31,8 @@ void enable_smbus(void) dev = PCI_DEV(0x0, 0x1f, 0x3); /* Check to make sure we've got the right device. */ - if (pci_read_config16(dev, 0x2) != 0x2930) { + if (pci_read_config16(dev, 0x2) != PCI_DEVICE_ID_INTEL_82801IB_SMB) die("SMBus controller not found!"); - } /* Set SMBus I/O base. */ pci_write_config32(dev, SMB_BASE, |