From 5c3452b80032eb81cc458d1fae63089ccc96d95a Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Tue, 15 May 2018 11:37:26 +0200 Subject: nb/intel/nehalem: Add ACPI path Provide a valid ACPI path for coreboot's SSDT generators. Fixes all ACPI errors found while booting GNU Linux 4.15 on Lenovo T410. Change-Id: Idd4986f39f21cb53cb019d0893d40fed94c6505b Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/26287 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans --- src/northbridge/intel/nehalem/northbridge.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src') diff --git a/src/northbridge/intel/nehalem/northbridge.c b/src/northbridge/intel/nehalem/northbridge.c index fa5d595c63..0303e92f67 100644 --- a/src/northbridge/intel/nehalem/northbridge.c +++ b/src/northbridge/intel/nehalem/northbridge.c @@ -92,12 +92,33 @@ static void pci_domain_set_resources(struct device *dev) assign_resources(dev->link_list); } +#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES) +static const char *northbridge_acpi_name(const struct device *dev) +{ + if (dev->path.type == DEVICE_PATH_DOMAIN) + return "PCI0"; + + if (dev->path.type != DEVICE_PATH_PCI || dev->bus->secondary != 0) + return NULL; + + switch (dev->path.pci.devfn) { + case PCI_DEVFN(0, 0): + return "MCHC"; + } + + return NULL; +} +#endif + static struct device_operations pci_domain_ops = { .read_resources = pci_domain_read_resources, .set_resources = pci_domain_set_resources, .enable_resources = NULL, .init = NULL, .scan_bus = pci_domain_scan_bus, +#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES) + .acpi_name = northbridge_acpi_name, +#endif }; static void mc_read_resources(struct device *dev) -- cgit v1.2.3