common: spl: show total time of SPL

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I93de59f4064a2579f8010da2655607f45840f8ed
This commit is contained in:
Joseph Chen 2020-08-13 15:05:12 +08:00 committed by Jianhong Chen
parent e220d75725
commit 45d851f407
1 changed files with 7 additions and 2 deletions

View File

@ -563,13 +563,13 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
break; break;
#if CONFIG_IS_ENABLED(ATF) #if CONFIG_IS_ENABLED(ATF)
case IH_OS_ARM_TRUSTED_FIRMWARE: case IH_OS_ARM_TRUSTED_FIRMWARE:
printf("Jumping to U-Boot via ARM Trusted Firmware\n\n"); printf("Jumping to U-Boot via ARM Trusted Firmware\n");
spl_invoke_atf(&spl_image); spl_invoke_atf(&spl_image);
break; break;
#endif #endif
#if CONFIG_IS_ENABLED(OPTEE) #if CONFIG_IS_ENABLED(OPTEE)
case IH_OS_OP_TEE: case IH_OS_OP_TEE:
printf("Jumping to U-Boot(0x%08lx) via OP-TEE(0x%08lx)\n\n", printf("Jumping to U-Boot(0x%08lx) via OP-TEE(0x%08lx)\n",
(ulong)spl_image.entry_point_os, (ulong)spl_image.entry_point_os,
(ulong)spl_image.entry_point); (ulong)spl_image.entry_point);
spl_cleanup_before_jump(&spl_image); spl_cleanup_before_jump(&spl_image);
@ -679,6 +679,8 @@ ulong spl_relocate_stack_gd(void)
/* cleanup before jump to next stage */ /* cleanup before jump to next stage */
void spl_cleanup_before_jump(struct spl_image_info *spl_image) void spl_cleanup_before_jump(struct spl_image_info *spl_image)
{ {
ulong us;
spl_board_prepare_for_jump(spl_image); spl_board_prepare_for_jump(spl_image);
disable_interrupts(); disable_interrupts();
@ -698,4 +700,7 @@ void spl_cleanup_before_jump(struct spl_image_info *spl_image)
dsb(); dsb();
isb(); isb();
us = (get_ticks() - gd->sys_start_tick) / 24UL;
printf("Total: %ld.%ld ms\n\n", us / 1000, us % 1000);
} }