[U-Boot] [PATCH v2 3/5] rockchip: back-to-bootrom: rk3188: chain from SPL via TPL to the BROM

Simon Glass
2017-09-25T02:12:46Z

On 18 September 2017 at 12:18, Philipp Tomsich
<philipp.tomsich@theobroma-systems.com> wrote:
> The RK3188 implementation previously passed the address of the stack
> frame created during save_boot_params via pmu->os_reg[2]. This was not
> strictly necessary, as the save_boot_params() function was called
> twice (first: for TPL, saving the context for the BROM; next: for SPL,
> saving the context for the TPL) and a back-to-bootrom from the SPL
> would thus return to TPL.
>
> To simplify things, we now assume that the state of the TPL is not
> corrupted during SPL (the binaries are non-overlapping) and that the
> SPL can safely return to TPL using the back-to-bootrom mechanism.
> Consequently, the TPL should expect the SPL to return control and then
> further return to the actual bootrom by performing another
> back-to-bootrom transition.
>
> Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> ---
>
> Changes in v2:
> - [added in v2] chain back_to_bootrom calls for SPL, first returning
> to the TPL (using the same mechanism) and the to the BROM from the
> TPL
>
> arch/arm/mach-rockchip/rk3188-board-spl.c | 10 ----------
> arch/arm/mach-rockchip/rk3188-board-tpl.c | 17 ++++++++++-------
> 2 files changed, 10 insertions(+), 17 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>