From 51c4d68fa7c95f82bccedb7f83ceee1de1a5731c Mon Sep 17 00:00:00 2001 From: Felix Held Date: Tue, 16 Feb 2021 23:14:42 +0100 Subject: soc/amd/cezanne/chip: add soc_acpi_name We were missing this, so we ran into the scope assert in acpi_device_write_pci_dev for the data fabric PCI devices. Signed-off-by: Felix Held Change-Id: I566791527ba839ba52ec5fa28f0f6c25f547d1da Reviewed-on: https://review.coreboot.org/c/coreboot/+/50815 Reviewed-by: Raul Rangel Reviewed-by: Marshall Dawson Tested-by: build bot (Jenkins) --- src/soc/amd/cezanne/chip.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/soc/amd/cezanne') diff --git a/src/soc/amd/cezanne/chip.c b/src/soc/amd/cezanne/chip.c index 78a4e33d76..261224326e 100644 --- a/src/soc/amd/cezanne/chip.c +++ b/src/soc/amd/cezanne/chip.c @@ -1,8 +1,11 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#include #include +#include #include #include +#include #include #include #include "chip.h" @@ -16,10 +19,24 @@ struct device_operations cpu_bus_ops = { .init = mp_cpu_bus_init, }; +static const char *soc_acpi_name(const struct device *dev) +{ + if (dev->path.type == DEVICE_PATH_DOMAIN) + return "PCI0"; + + if (dev->path.type != DEVICE_PATH_PCI) + return NULL; + + printk(BIOS_WARNING, "Unknown PCI device: dev: %d, fn: %d\n", + PCI_SLOT(dev->path.pci.devfn), PCI_FUNC(dev->path.pci.devfn)); + return NULL; +}; + static struct device_operations pci_domain_ops = { .read_resources = pci_domain_read_resources, .set_resources = pci_domain_set_resources, .scan_bus = pci_domain_scan_bus, + .acpi_name = soc_acpi_name, }; static void set_mmio_dev_ops(struct device *dev) -- cgit v1.2.3