From 3caf34167c0d05f53bf1b466117ff234f5c7e14e Mon Sep 17 00:00:00 2001 From: Werner Zeh Date: Thu, 5 Apr 2018 07:36:40 +0200 Subject: fsp_broadwell_de: Provide valid ACPI path names for domain and LPC Provide ACPI path names for PCI domain and LPC device so that generated ACPI tables have valid device paths. Change-Id: I5a97e45ef50ec5ee9d64c5d2834968a02455cf72 Signed-off-by: Werner Zeh Reviewed-on: https://review.coreboot.org/25534 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/soc/intel/fsp_broadwell_de/chip.c | 12 ++++++++++++ src/soc/intel/fsp_broadwell_de/southcluster.c | 13 +++++++++++++ 2 files changed, 25 insertions(+) diff --git a/src/soc/intel/fsp_broadwell_de/chip.c b/src/soc/intel/fsp_broadwell_de/chip.c index b8db395350..118fb993fb 100644 --- a/src/soc/intel/fsp_broadwell_de/chip.c +++ b/src/soc/intel/fsp_broadwell_de/chip.c @@ -30,6 +30,15 @@ static void pci_domain_set_resources(device_t dev) assign_resources(dev->link_list); } +#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES) +static const char *domain_acpi_name(const struct device *dev) +{ + if (dev->path.type == DEVICE_PATH_DOMAIN) + return "PCI0"; + return NULL; +} +#endif + static struct device_operations pci_domain_ops = { .read_resources = pci_domain_read_resources, .set_resources = pci_domain_set_resources, @@ -37,6 +46,9 @@ static struct device_operations pci_domain_ops = { .init = NULL, .scan_bus = pci_domain_scan_bus, .ops_pci_bus = pci_bus_default_ops, +#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES) + .acpi_name = domain_acpi_name +#endif }; static struct device_operations cpu_bus_ops = { diff --git a/src/soc/intel/fsp_broadwell_de/southcluster.c b/src/soc/intel/fsp_broadwell_de/southcluster.c index 3bf5429e39..8ad27afc72 100644 --- a/src/soc/intel/fsp_broadwell_de/southcluster.c +++ b/src/soc/intel/fsp_broadwell_de/southcluster.c @@ -263,6 +263,16 @@ void southcluster_enable_dev(device_t dev) } } +#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES) +static const char *lpc_acpi_name(const struct device *dev) +{ + if (dev->path.pci.devfn == LPC_DEV_FUNC) + return "LPC0"; + else + return NULL; +} +#endif + static struct device_operations device_ops = { .read_resources = sc_read_resources, .set_resources = pci_dev_set_resources, @@ -271,6 +281,9 @@ static struct device_operations device_ops = { .enable = southcluster_enable_dev, .scan_bus = scan_lpc_bus, .ops_pci = &soc_pci_ops, +#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES) + .acpi_name = lpc_acpi_name, +#endif }; static const struct pci_driver southcluster __pci_driver = { -- cgit v1.2.3