From 16ffcff0283d2f10821bad7cbcf89003a86c0063 Mon Sep 17 00:00:00 2001 From: Anshul Dalal Date: Fri, 17 Oct 2025 18:45:30 +0530 Subject: spl: split spl_board_fixups to arch/board specific The current spl_board_fixups API allows for modification of spl_image before the SPL jumps to it. This can be used to modify the DT for the next boot stage, however the current API only allows either the machine arch or the board to use it. This limits the utility of the API as there might be certain fixups that should be applied to all boards sharing the same machine architecture with others being board specific. For TI's K3 specifically, this prevents us from performing architecture level fixups since a lot of TI boards are already making use of the spl_board_fixups API. Therefore this patch splits the API into two to allow both board and the architecture specific fixups. The order is kept as arch then board to give board specific fixups the precedence. Reviewed-by: Dhruva Gole Signed-off-by: Anshul Dalal Tested-by: Wadim Egorov --- common/spl/spl.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'common') diff --git a/common/spl/spl.c b/common/spl/spl.c index 8c20b75b178..64313cb8dfe 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -120,8 +120,13 @@ int __weak booti_setup(ulong image, ulong *relocated_addr, ulong *size, bool for } #endif -/* Weak default function for arch/board-specific fixups to the spl_image_info */ -void __weak spl_perform_fixups(struct spl_image_info *spl_image) +/* Weak default function for arch specific fixups to the spl_image_info */ +void __weak spl_perform_arch_fixups(struct spl_image_info *spl_image) +{ +} + +/* Weak default function for board specific fixups to the spl_image_info */ +void __weak spl_perform_board_fixups(struct spl_image_info *spl_image) { } @@ -776,7 +781,8 @@ void board_init_r(gd_t *dummy1, ulong dummy2) hang(); } - spl_perform_fixups(&spl_image); + spl_perform_arch_fixups(&spl_image); + spl_perform_board_fixups(&spl_image); os = spl_image.os; if (os == IH_OS_U_BOOT) { -- cgit v1.2.3