]> git.dujemihanovic.xyz Git - u-boot.git/commit
arm: mvebu: spl: Fix support for loading U-Boot proper from SD card
authorPali Rohár <pali@kernel.org>
Sun, 8 Jan 2023 23:52:09 +0000 (00:52 +0100)
committerStefan Roese <sr@denx.de>
Wed, 1 Mar 2023 05:39:17 +0000 (06:39 +0100)
commit913d7561c071e4051c2474bfb53775cd70865a46
treeecdf4864f0f76facaf61fee6c69f3be12df3f599
parent718d1c749fb2c2c941861afec92b9bd852e824c7
arm: mvebu: spl: Fix support for loading U-Boot proper from SD card

Marvell BootROM loads MMC image from sector 0 (HW boot or data partition)
and SD image from sector 1.

So for SD card booting it is needed to not use constant CONFIG MMC options
and instead of them it is needed to define functions spl_mmc_boot_mode()
spl_mmc_get_uboot_raw_sector() which determinate offsets at SPL runtime
based on MMC or SD card.

Calculation of SD card sector expects following values:
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET=0
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0

Fixes: 2226ca173486 ("arm: mvebu: Load U-Boot proper binary in SPL code based on kwbimage header")
Signed-off-by: Pali Rohár <pali@kernel.org>
arch/arm/mach-mvebu/Kconfig
arch/arm/mach-mvebu/spl.c