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 <d-gole@ti.com> Signed-off-by: Anshul Dalal <anshuld@ti.com> Tested-by: Wadim Egorov <w.egorov@phytec.de>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user