summaryrefslogtreecommitdiff
path: root/src/device/device_const.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/device/device_const.c')
-rw-r--r--src/device/device_const.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/device/device_const.c b/src/device/device_const.c
index ec128e877d..f60f749c49 100644
--- a/src/device/device_const.c
+++ b/src/device/device_const.c
@@ -187,9 +187,17 @@ DEVTREE_CONST struct device *pcidev_path_on_root(pci_devfn_t devfn)
{
DEVTREE_CONST struct device *pci_domain;
+ /* Work around pcidev_path_behind() below failing
+ * due tue complicated devicetree with topology
+ * being manipulated on-the-fly.
+ */
+ if (IS_ENABLED(CONFIG_NORTHBRIDGE_AMD_AMDFAM10))
+ return dev_find_slot(0, devfn);
+
pci_domain = dev_find_path(NULL, DEVICE_PATH_DOMAIN);
if (!pci_domain)
return NULL;
+
return pcidev_path_behind(pci_domain->link_list, devfn);
}