summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-05-22 05:05:35 -0600
committerTom Rini <trini@konsulko.com>2017-06-05 14:13:08 -0400
commit824bb1b45371efcb10561456e894d7c2fa1a4b88 (patch)
treeff61ce00e99cfac753c17891640f87dbe184524b /include
parent9d2542d062da9e1e3934f504b4d769998a76c991 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/bootstage.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/include/bootstage.h b/include/bootstage.h
index 5f4fffaffb..c972027ffc 100644
--- a/include/bootstage.h
+++ b/include/bootstage.h
@@ -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() \