summaryrefslogtreecommitdiff
path: root/src/soc/amd/cezanne
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2021-02-16 23:14:42 +0100
committerFelix Held <felix-coreboot@felixheld.de>2021-02-18 01:15:55 +0000
commit51c4d68fa7c95f82bccedb7f83ceee1de1a5731c (patch)
tree02f2bc1d514e08f7e5a8ed42f9baba3ca4c999d3 /src/soc/amd/cezanne
parent74ace5cd3a0dd6ea3e25923359decc80fab6e16f (diff)
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 <felix-coreboot@felixheld.de> Change-Id: I566791527ba839ba52ec5fa28f0f6c25f547d1da Reviewed-on: https://review.coreboot.org/c/coreboot/+/50815 Reviewed-by: Raul Rangel <rrangel@chromium.org> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/cezanne')
-rw-r--r--src/soc/amd/cezanne/chip.c17
1 files changed, 17 insertions, 0 deletions
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 <console/console.h>
#include <device/device.h>
+#include <device/pci.h>
#include <fsp/api.h>
#include <soc/data_fabric.h>
+#include <soc/pci_devs.h>
#include <soc/southbridge.h>
#include <types.h>
#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)