spl: Add functions for next and previous phase
It is useful to be able to figure out which phase we are loading next and which phase we came from. Add some functions to handle this as well as returning the name of a phase. This allows messages like "Booting to x" where x is the next phase. At present, TPL says 'Jumping to U-Boot' at the end, when in fact it is jumping to SPL. This is confusing, so use the new functions to correct this. Tests for this will come with an upcoming minor SPL test refactor. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -734,7 +734,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
|
||||
debug("Failed to stash bootstage: err=%d\n", ret);
|
||||
#endif
|
||||
|
||||
debug("loaded - jumping to U-Boot...\n");
|
||||
debug("loaded - jumping to %s...\n", spl_phase_name(spl_next_phase()));
|
||||
spl_board_prepare_for_boot();
|
||||
jump_to_image_no_args(&spl_image);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user