diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2023-07-24 22:18:41 +0200 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2023-07-30 18:53:08 +0200 |
commit | 7d4c8cfe2547596d07c51b2f38cde8d4c75f17fc (patch) | |
tree | 772d0829c3ec68135a399efb229b29f964fc920b /common/spl/spl.c | |
parent | 8d2c311ce64939fe829037e4ef7951c3fafaee06 (diff) | |
download | u-boot-7d4c8cfe2547596d07c51b2f38cde8d4c75f17fc.tar.gz |
spl: initialize PCI before booting
MMC, SATA, and USB may be using PCI based controllers.
Initialize the PCI sub-system before trying to boot.
Remove the initialization for NVMe that is now redundant.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Diffstat (limited to 'common/spl/spl.c')
-rw-r--r-- | common/spl/spl.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c index f09bb977814..0062f3f45d9 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -800,6 +800,13 @@ void board_init_r(gd_t *dummy1, ulong dummy2) IS_ENABLED(CONFIG_SPL_ATF)) dram_init_banksize(); + if (CONFIG_IS_ENABLED(PCI)) { + ret = pci_init(); + if (ret) + puts(SPL_TPL_PROMPT "Cannot initialize PCI\n"); + /* Don't fail. We still can try other boot methods. */ + } + bootcount_inc(); /* Dump driver model states to aid analysis */ |