]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
rockchip: Add SPL_PAD_TO Kconfig default value
authorJonas Karlman <jonas@kwiboo.se>
Sun, 13 Apr 2025 19:59:37 +0000 (19:59 +0000)
committerKever Yang <kever.yang@rock-chips.com>
Tue, 6 May 2025 07:58:25 +0000 (15:58 +0800)
Almost all Rockchip boards use the same Kconfig value for SPL_PAD_TO,
0x7f8000.

u-boot-rockchip.bin is typically written to offset 64S (32KiB) of MMC
media. u-boot.itb (or u-boot.img) is typically expected at offset 16384S
(8MiB) of MMC media (SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x4000).

SPL_PAD_TO is used as the offset for u-boot.itb (or u-boot.img) in the
generated simple-bin binman image, and can be calculated as:

  SPL_PAD_TO = (16384S - 64S) * 512 = 0x7f8000

Add this value as a default value for ARCH_ROCKCHIP.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
common/spl/Kconfig

index 0bc96d0a7818f5f9240d01d9bddfef44b66f534e..aa3a85eea54d851b9ab8cf54b019c0001c58d1b6 100644 (file)
@@ -96,6 +96,7 @@ config SPL_MAX_SIZE
 
 config SPL_PAD_TO
        hex "Offset to which the SPL should be padded before appending the SPL payload"
+       default 0x7f8000 if ARCH_ROCKCHIP
        default 0x31000 if ARCH_MX6 && MX6_OCRAM_256KB
        default 0x11000 if ARCH_MX7 || (ARCH_MX6 && !MX6_OCRAM_256KB)
        default 0x10000 if ARCH_KEYSTONE