]> git.baikalelectronics.ru Git - uboot.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)
commitf14d029dfa0e646a076c2ad6e5f0d1c7edac3ccc
treeecdf4864f0f76facaf61fee6c69f3be12df3f599
parent455a364447f4d50eb4eeedee8d44feea5617c4f9
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: 3f0f1d263c27 ("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