Many USB controllers are PCI bus devices. Before calling spl_usb_load() we
must bind the PCI devices.

Signed-off-by: Heinrich Schuchardt <heinrich.schucha...@canonical.com>
---
 common/spl/spl_usb.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/common/spl/spl_usb.c b/common/spl/spl_usb.c
index 479e2dc182..57275d6000 100644
--- a/common/spl/spl_usb.c
+++ b/common/spl/spl_usb.c
@@ -13,6 +13,7 @@
 #include <spl.h>
 #include <asm/u-boot.h>
 #include <errno.h>
+#include <init.h>
 #include <usb.h>
 #include <fat.h>
 
@@ -66,6 +67,8 @@ int spl_usb_load(struct spl_image_info *spl_image,
 static int spl_usb_load_image(struct spl_image_info *spl_image,
                              struct spl_boot_device *bootdev)
 {
+       if (IS_ENABLED(CONFIG_SPL_PCI))
+               pci_init();
        return spl_usb_load(spl_image, bootdev,
                            CONFIG_SYS_USB_FAT_BOOT_PARTITION,
                            CONFIG_SPL_FS_LOAD_PAYLOAD_NAME);
-- 
2.40.1

Reply via email to