[PATCH 1/1] spl: initialize PCI before booting from MMC

Some MMC controllers are PCI bus devices. Before calling spl_mmc_load() we must bind the PCI devices.
Don't write any warning if pci_init() fails as other MMC controllers don't need it.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com --- common/spl/spl_mmc.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index a665091b00..915de27eb5 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -7,6 +7,7 @@ */ #include <common.h> #include <dm.h> +#include <init.h> #include <log.h> #include <part.h> #include <spl.h> @@ -495,6 +496,9 @@ int spl_mmc_load(struct spl_image_info *spl_image, int spl_mmc_load_image(struct spl_image_info *spl_image, struct spl_boot_device *bootdev) { + + if (IS_ENABLED(CONFIG_SPL_PCI)) + pci_init(); return spl_mmc_load(spl_image, bootdev, #ifdef CONFIG_SPL_FS_LOAD_PAYLOAD_NAME CONFIG_SPL_FS_LOAD_PAYLOAD_NAME,

Hi Heinrich,
On 7/24/23 12:12, Heinrich Schuchardt wrote:
Some MMC controllers are PCI bus devices. Before calling spl_mmc_load() we must bind the PCI devices.
Don't write any warning if pci_init() fails as other MMC controllers don't need it.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
common/spl/spl_mmc.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index a665091b00..915de27eb5 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -7,6 +7,7 @@ */ #include <common.h> #include <dm.h> +#include <init.h> #include <log.h> #include <part.h> #include <spl.h> @@ -495,6 +496,9 @@ int spl_mmc_load(struct spl_image_info *spl_image, int spl_mmc_load_image(struct spl_image_info *spl_image, struct spl_boot_device *bootdev) {
This empty line very likely just slipped in? Please remove.
Other than this:
Reviewed-by: Stefan Roese sr@denx.de
Thanks, Stefan
- if (IS_ENABLED(CONFIG_SPL_PCI))
return spl_mmc_load(spl_image, bootdev, #ifdef CONFIG_SPL_FS_LOAD_PAYLOAD_NAME CONFIG_SPL_FS_LOAD_PAYLOAD_NAME,pci_init();
Viele Grüße, Stefan Roese
participants (2)
-
Heinrich Schuchardt
-
Stefan Roese