]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
spl: spi: fix falcon mode for spi boot
authorAnshul Dalal <anshuld@ti.com>
Tue, 9 Sep 2025 08:17:30 +0000 (13:47 +0530)
committerTom Rini <trini@konsulko.com>
Fri, 12 Sep 2025 14:24:21 +0000 (08:24 -0600)
spl_start_uboot is a board overridable function that switches to falcon
boot mode on return value of 0.

Though for SPI, the falcon boot mode was being enabled on return value
of 1 which is not the correct behaviour. Therefore this patch fixes it
to the expected boot flow.

Fixes: 14509a28aa20 ("spl: spi: Consolidate spi_load_image_os into spl_spi_load_image")
Signed-off-by: Anshul Dalal <anshuld@ti.com>
common/spl/spl_spi.c

index 00dbd3011f05581ba302f253eefa9d0cf29a80f7..c2b188371c2d7a07a25ab448014129b934722260 100644 (file)
@@ -80,7 +80,7 @@ static int spl_spi_load_image(struct spl_image_info *spl_image,
        spl_load_init(&load, spl_spi_fit_read, flash, 1);
 
 #if CONFIG_IS_ENABLED(OS_BOOT)
-       if (spl_start_uboot()) {
+       if (!spl_start_uboot()) {
                int err = spl_load(spl_image, bootdev, &load, 0,
                                   CONFIG_SYS_SPI_KERNEL_OFFS);