spl: Add functions for next and previous phase
authorSimon Glass <sjg@chromium.org>
Thu, 14 Jan 2021 03:29:42 +0000 (20:29 -0700)
committerTom Rini <trini@konsulko.com>
Wed, 27 Jan 2021 22:03:16 +0000 (17:03 -0500)
commit09d9ba9097ceb374f2802506c9e755fd8d5dd861
treea6d33a1a08089a112d037a4128fac5dc14c438f6
parent040fad3791fe05b985516a68c9437847173da56a
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>
common/spl/spl.c
include/spl.h