[PATCH] bootstage: Add SPL support
Marek Vasut
marex at denx.de
Tue Sep 14 05:19:35 CEST 2021
Allow usage of the bootstage facilities in SPL.
Signed-off-by: Marek Vasut <marex at denx.de>
Cc: Simon Glass <sjg at chromium.org>
---
common/Kconfig.boot | 9 +++++++++
include/bootstage.h | 2 +-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/common/Kconfig.boot b/common/Kconfig.boot
index 902a5b8fbea..c230b5c76e4 100644
--- a/common/Kconfig.boot
+++ b/common/Kconfig.boot
@@ -667,6 +667,15 @@ config SHOW_BOOT_PROGRESS
-150 common/cmd_nand.c Incorrect FIT image format
151 common/cmd_nand.c FIT image format OK
+config SPL_SHOW_BOOT_PROGRESS
+ bool "Show boot progress in a board-specific manner"
+ depends on SPL
+ help
+ Defining this option allows to add some board-specific code (calling
+ a user-provided function show_boot_progress(int) that enables you to
+ show the system's boot progress on some display (for example, some
+ LEDs) on your board. For details see SHOW_BOOT_PROGRESS.
+
endmenu
menu "Boot media"
diff --git a/include/bootstage.h b/include/bootstage.h
index f837a387c8c..8d1989ac0e5 100644
--- a/include/bootstage.h
+++ b/include/bootstage.h
@@ -220,7 +220,7 @@ enum bootstage_id {
*/
ulong timer_get_boot_us(void);
-#if defined(USE_HOSTCC) || !CONFIG_IS_ENABLED(BOOTSTAGE)
+#if defined(USE_HOSTCC) || !CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS)
#define show_boot_progress(val) do {} while (0)
#else
/**
--
2.33.0
More information about the U-Boot
mailing list