]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
spl: mmc: load kernel image before args in falcon
authorAnshul Dalal <anshuld@ti.com>
Tue, 23 Sep 2025 12:46:37 +0000 (18:16 +0530)
committerTom Rini <trini@konsulko.com>
Tue, 7 Oct 2025 19:02:18 +0000 (13:02 -0600)
Load the kernel image before args in falcon mode to be consistent with
the load order for other boot media.

Signed-off-by: Anshul Dalal <anshuld@ti.com>
common/spl/spl_mmc.c

index d06f9f0dee610fb636929dd270ba0256bcfd5c65..cd56cf7105585d2650298a72c1c49f23de0686e3 100644 (file)
@@ -152,6 +152,16 @@ static int mmc_load_image_raw_os(struct spl_image_info *spl_image,
 {
        int ret;
 
+       ret = mmc_load_image_raw_sector(spl_image, bootdev, mmc,
+               CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR);
+       if (ret)
+               return ret;
+
+       if (spl_image->os != IH_OS_LINUX && spl_image->os != IH_OS_TEE) {
+               puts("Expected image is not found. Trying to start U-Boot\n");
+               return -ENOENT;
+       }
+
 #if defined(CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR)
        unsigned long count;
 
@@ -165,16 +175,6 @@ static int mmc_load_image_raw_os(struct spl_image_info *spl_image,
        }
 #endif /* CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR */
 
-       ret = mmc_load_image_raw_sector(spl_image, bootdev, mmc,
-               CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR);
-       if (ret)
-               return ret;
-
-       if (spl_image->os != IH_OS_LINUX && spl_image->os != IH_OS_TEE) {
-               puts("Expected image is not found. Trying to start U-Boot\n");
-               return -ENOENT;
-       }
-
        return 0;
 }
 #else