mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
bootstage: Support SPL
At present bootstage only supports U-Boot proper. But SPL can also consume boot time so it is useful to have the record start there. Add bootstage support to SPL. Also support stashing the timing information when SPL finishes so that it can be picked up and reported by U-Boot proper. This provides a full boot time record, excluding only the time taken by the boot ROM. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@ -177,6 +177,7 @@ enum bootstage_id {
|
||||
*/
|
||||
BOOTSTAGE_ID_AWAKE,
|
||||
BOOTSTAGE_ID_START_SPL,
|
||||
BOOTSTAGE_ID_END_SPL,
|
||||
BOOTSTAGE_ID_START_UBOOT_F,
|
||||
BOOTSTAGE_ID_START_UBOOT_R,
|
||||
BOOTSTAGE_ID_USB_START,
|
||||
@ -200,6 +201,7 @@ enum bootstage_id {
|
||||
BOOTSTAGE_ID_ACCUM_SPI,
|
||||
BOOTSTAGE_ID_ACCUM_DECOMP,
|
||||
BOOTSTAGE_ID_FPGA_INIT,
|
||||
BOOTSTATE_ID_ACCUM_DM_SPL,
|
||||
BOOTSTATE_ID_ACCUM_DM_F,
|
||||
BOOTSTATE_ID_ACCUM_DM_R,
|
||||
|
||||
@ -228,8 +230,14 @@ ulong timer_get_boot_us(void);
|
||||
void show_boot_progress(int val);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BOOTSTAGE) && !defined(CONFIG_SPL_BUILD) && \
|
||||
!defined(USE_HOSTCC)
|
||||
#if !defined(USE_HOSTCC)
|
||||
#if CONFIG_IS_ENABLED(BOOTSTAGE)
|
||||
#define ENABLE_BOOTSTAGE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_BOOTSTAGE
|
||||
|
||||
/* This is the full bootstage implementation */
|
||||
|
||||
/**
|
||||
@ -420,7 +428,8 @@ static inline int bootstage_init(bool first)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_BOOTSTAGE */
|
||||
|
||||
#endif /* ENABLE_BOOTSTAGE */
|
||||
|
||||
/* Helper macro for adding a bootstage to a line of code */
|
||||
#define BOOTSTAGE_MARKER() \
|
||||
|
Reference in New Issue
Block a user