spl: Add a function to determine the U-Boot phase
authorSimon Glass <sjg@chromium.org>
Wed, 25 Sep 2019 14:11:20 +0000 (08:11 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Tue, 8 Oct 2019 05:51:03 +0000 (13:51 +0800)
commit8e83b76df41f2a7c36adae7af7aa40a0b1ab36a1
tree5f0a1b203867f0021b99ac327a938c62ad04a1d4
parent3cd71981531a767e5109368fede61931944bdb5c
spl: Add a function to determine the U-Boot phase

U-Boot is built in three phases: TPL, SPL and U-Boot proper. Sometimes
it is necessary to use different init code depending on the phase. For
example, TPL might do very basic CPU init, SPL might do a little more
and U-Boot proper might bring the CPU up to full speed and enable all
cores.

Add a function which allows easy determination of the current phase being
built.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
include/spl.h