summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorKever Yang <kever.yang@rock-chips.com>2017-09-13 18:24:24 +0800
committerTom Rini <trini@konsulko.com>2017-09-22 07:40:00 -0400
commita8c5112a269b943253ee57863057fd4a3abe180f (patch)
tree2962ae16ea92bbb43d4fa41f1b09ab95306c2e39 /common
parent4e6eeeac1294b489e122a09596087ed06737d055 (diff)
spl: stash bootstage info before jump to next stage
Since we may jump to next stage like ATF/OP-TEE instead of U-Boot, we need to stash the bootstage info before it. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c
index ce9819e4db..4afbe97fc1 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -424,13 +424,6 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
debug("SPL malloc() used %#lx bytes (%ld KB)\n", gd->malloc_ptr,
gd->malloc_ptr / 1024);
#endif
-
- if (CONFIG_IS_ENABLED(ATF_SUPPORT)) {
- debug("loaded - jumping to U-Boot via ATF BL31.\n");
- bl31_entry();
- }
-
- debug("loaded - jumping to U-Boot...\n");
#ifdef CONFIG_BOOTSTAGE_STASH
int ret;
@@ -440,6 +433,13 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
if (ret)
debug("Failed to stash bootstage: err=%d\n", ret);
#endif
+
+ if (CONFIG_IS_ENABLED(ATF_SUPPORT)) {
+ debug("loaded - jumping to U-Boot via ATF BL31.\n");
+ bl31_entry();
+ }
+
+ debug("loaded - jumping to U-Boot...\n");
spl_board_prepare_for_boot();
jump_to_image_no_args(&spl_image);
}