[PATCH] pci: correct PCI device enumeration to include all functions on device 0
Maximilian Brune
maximilian.brune at 9elements.com
Thu Apr 16 18:13:05 CEST 2026
Currently the implementation does not just skip all devices beside
device 0, it also skips all functions (besides 0) on device 0. This
broke basically all AMD platforms, since they have a lot of internal SOC
devices behind on these functions.
This was detected, because the XHCI controller and therefore the USB
devices were not found by u-boot on AMD/crater platform.
Fix it by checking all functions on device 0 (Linux does the same).
TEST=build u-boot as coreboot payload and run it on a recent x86 AMD
platform. Devices like the XHCI controller are now found again.
---
drivers/pci/pci-uclass.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index 83b76d01f24..f58d542ef75 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -927,7 +927,7 @@ int pci_bind_bus_devices(struct udevice *bus)
if (PCI_FUNC(bdf) && !found_multi)
continue;
- if (only_one_child(bus) && (PCI_MASK_BUS(bdf) > 0))
+ if (only_one_child(bus) && (PCI_DEV(bdf) > 0))
continue;
/* Check only the first access, we don't expect problems */
--
2.53.0
More information about the U-Boot
mailing list