diff options
| author | Anshul Dalal <[email protected]> | 2025-10-17 18:45:30 +0530 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-10-22 12:05:52 -0600 |
| commit | 16ffcff0283d2f10821bad7cbcf89003a86c0063 (patch) | |
| tree | 846cbd766e7610e8c973d3835caf692d35acf10a /common | |
| parent | 856480eef0a25dde339cce6d1889efdc836c6be8 (diff) | |
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 <[email protected]>
Signed-off-by: Anshul Dalal <[email protected]>
Tested-by: Wadim Egorov <[email protected]>
Diffstat (limited to 'common')
| -rw-r--r-- | common/spl/spl.c | 12 |
1 files changed, 9 insertions, 3 deletions
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) { |
