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/northbridge/intel/pineview/gma.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/northbridge/intel') diff --git a/src/northbridge/intel/pineview/gma.c b/src/northbridge/intel/pineview/gma.c index e46bd7c7c2..e0ed0f0500 100644 --- a/src/northbridge/intel/pineview/gma.c +++ b/src/northbridge/intel/pineview/gma.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -234,9 +235,9 @@ static void gma_func0_init(struct device *dev) int vga_disable = (pci_read_config16(dev, GGC) & 2) >> 1; /* Find base addresses */ - mmio_res = find_resource(dev, 0x10); - gtt_res = find_resource(dev, 0x1c); - pio_res = find_resource(dev, 0x14); + mmio_res = find_resource(dev, PCI_BASE_ADDRESS_0); + gtt_res = find_resource(dev, PCI_BASE_ADDRESS_3); + pio_res = find_resource(dev, PCI_BASE_ADDRESS_1); physbase = pci_read_config32(dev, 0x5c) & ~0xf; if (gtt_res && gtt_res->base && physbase && pio_res && pio_res->base) { -- cgit v1.2.3