diff --git a/common/spl/spl.c b/common/spl/spl.c index ce9819e4db072eed79153879d6322b67d2c08887..4afbe97fc1253312b4dc1f4213bb3ec8d0114e46 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); }