From 8f0075c37924fc3be82b226d13a5e522eea9f795 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Wed, 9 Aug 2023 19:28:39 +0200 Subject: nb,soc/amd/*/northbridge: use mmio_range to add IOAPIC2 resources MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of open coding this, use the mmio_range helper function to tell the resource allocator about the northbridge's IOAPIC's MMIO. This change sets the IORESOURCE_RESERVE and IORESOURCE_STORED bits in the resource flags that weren't set before, but mmio_range is already used elsewhere for similar purposes. TEST=None Signed-off-by: Felix Held Change-Id: Id66a73cdb22fd551e4359914ba5513313dcc3193 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77173 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki --- src/northbridge/amd/pi/00730F01/northbridge.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/northbridge/amd/pi') diff --git a/src/northbridge/amd/pi/00730F01/northbridge.c b/src/northbridge/amd/pi/00730F01/northbridge.c index 55a0dab629..0c389d5443 100644 --- a/src/northbridge/amd/pi/00730F01/northbridge.c +++ b/src/northbridge/amd/pi/00730F01/northbridge.c @@ -158,8 +158,6 @@ static void add_fixed_resources(struct device *dev, int index) static void nb_read_resources(struct device *dev) { - struct resource *res; - /* * This MMCONF resource must be reserved in the PCI domain. * It is not honored by the coreboot resource allocator if it is in @@ -168,10 +166,7 @@ static void nb_read_resources(struct device *dev) mmconf_resource(dev, MMIO_CONF_BASE); /* NB IOAPIC2 resource */ - res = new_resource(dev, IO_APIC2_ADDR); /* IOAPIC2 */ - res->base = IO_APIC2_ADDR; - res->size = 0x00001000; - res->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; + mmio_range(dev, IO_APIC2_ADDR, IO_APIC2_ADDR, 0x1000); add_fixed_resources(dev, 0); } -- cgit v1.2.3