Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/58334 )
Change subject: soc/amd/common/block: move FCH IOAPIC resource from LPC to SMBus ......................................................................
soc/amd/common/block: move FCH IOAPIC resource from LPC to SMBus
The SMBus controller is the function 0 of the FCH PCI device that needs to be enable in order for all other FCH PCI functions to be enabled, so it's the primary function of the FCH. The init function of this device already contains the FCH IOAPIC initialization code, so add its MMIO resource in the read_resources function of the SMBus device instead of the LPC device where it was added before.
Signed-off-by: Felix Held felix-coreboot@felixheld.de Suggested-by: Raul E Rangel rrangel@chromium.org Change-Id: I585afd463c1c00cd87ced0617e7802503c5deba5 --- M src/soc/amd/common/block/lpc/lpc.c M src/soc/amd/common/block/smbus/sm.c 2 files changed, 7 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/58334/1
diff --git a/src/soc/amd/common/block/lpc/lpc.c b/src/soc/amd/common/block/lpc/lpc.c index 365c14dbf..4715414 100644 --- a/src/soc/amd/common/block/lpc/lpc.c +++ b/src/soc/amd/common/block/lpc/lpc.c @@ -114,11 +114,6 @@ fixed_mem_resource(dev, 2, SPI_BASE_ADDRESS / 1024, 1, IORESOURCE_SUBTRACTIVE);
- res = new_resource(dev, 3); /* IOAPIC */ - res->base = IO_APIC_ADDR; - res->size = 0x00001000; - res->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; - compact_resources(dev); }
diff --git a/src/soc/amd/common/block/smbus/sm.c b/src/soc/amd/common/block/smbus/sm.c index ce66cbb..e64ff6d 100644 --- a/src/soc/amd/common/block/smbus/sm.c +++ b/src/soc/amd/common/block/smbus/sm.c @@ -73,8 +73,14 @@ } #endif
+static void smbus_read_resources(struct device *dev) +{ + /* FCH IOAPIC */ + mmio_resource(dev, 0, IO_APIC_ADDR / KiB, 4); +} + static struct device_operations smbus_ops = { - .read_resources = noop_read_resources, + .read_resources = smbus_read_resources, .set_resources = noop_set_resources, .enable_resources = pci_dev_enable_resources, .init = sm_init,