[PATCH v2 3/5] spl: mmc: Respect sector value passed to mmc_load_image_raw_partition

Ralph Siemsen ralph.siemsen at linaro.org
Wed Dec 3 20:42:45 CET 2025


Hi Jan,

On Mon, Dec 1, 2025 at 2:33 AM Jan Kiszka <jan.kiszka at siemens.com> wrote:
> --- a/common/spl/spl_mmc.c
> +++ b/common/spl/spl_mmc.c
> @@ -137,11 +137,7 @@ static int mmc_load_image_raw_partition(struct spl_image_info *spl_image,
>                 return ret;
>         }
>
> -#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
>         return mmc_load_image_raw_sector(spl_image, bootdev, mmc, info.start + sector);
> -#else
> -       return mmc_load_image_raw_sector(spl_image, bootdev, mmc, info.start);
> -#endif
>  }
>  #endif

This patch seems correct, however in testing, it does not boot for me
on cyclone V.

The reason is because the sector offset is zero, rather than the
expected value (0x200 for socfpga gen 5).

This happens because of Kconfig dependency:
https://gitlab.com/u-boot/u-boot/-/blob/master/common/spl/Kconfig?ref_type=heads#L586

I removed this "depends on" and thereafter I am able to load the main
u-boot successfully, although I don't think that is necessarily the
right way to fix the issue.

Regards
Ralph


More information about the U-Boot mailing list