From a4dd33cc8b52f686908590bb41b1c69a9b6c5db5 Mon Sep 17 00:00:00 2001 From: Elyes HAOUAS Date: Tue, 11 Aug 2020 09:39:43 +0200 Subject: src: Use PCI_BASE_ADDRESS_* macros instead of magic numbers Change-Id: Id3390c5ac6a9517ffc2d202f41802e6f4d2e314c Signed-off-by: Elyes HAOUAS Reviewed-on: https://review.coreboot.org/c/coreboot/+/44371 Reviewed-by: Patrick Rudolph Tested-by: build bot (Jenkins) --- src/southbridge/intel/i82801ix/smbus.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/southbridge/intel/i82801ix') diff --git a/src/southbridge/intel/i82801ix/smbus.c b/src/southbridge/intel/i82801ix/smbus.c index 815705d20a..72c3110990 100644 --- a/src/southbridge/intel/i82801ix/smbus.c +++ b/src/southbridge/intel/i82801ix/smbus.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -23,7 +24,7 @@ static int lsmbus_read_byte(struct device *dev, u8 address) device = dev->path.i2c.device; pbus = get_pbus_smbus(dev); - res = find_resource(pbus->dev, 0x20); + res = find_resource(pbus->dev, PCI_BASE_ADDRESS_4); return do_smbus_read_byte(res->base, device, address); } @@ -36,7 +37,7 @@ static int lsmbus_write_byte(struct device *dev, u8 address, u8 val) device = dev->path.i2c.device; pbus = get_pbus_smbus(dev); - res = find_resource(pbus->dev, 0x20); + res = find_resource(pbus->dev, PCI_BASE_ADDRESS_4); return do_smbus_write_byte(res->base, device, address, val); } -- cgit v1.2.3