bootstage: Add SPL support
authorMarek Vasut <marex@denx.de>
Sat, 23 Oct 2021 01:06:03 +0000 (03:06 +0200)
committerSimon Glass <sjg@chromium.org>
Sun, 31 Oct 2021 18:26:44 +0000 (12:26 -0600)
Allow usage of the bootstage facilities in SPL.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/x86/cpu/cpu.c
board/siemens/iot2050/board.c
common/Kconfig.boot
common/init/board_init.c
common/spl/spl.c
include/bootstage.h

index 01dece5..86f53e7 100644 (file)
@@ -178,7 +178,7 @@ int default_print_cpuinfo(void)
        return 0;
 }
 
-#if CONFIG_IS_ENABLED(BOOTSTAGE)
+#if CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS)
 void show_boot_progress(int val)
 {
        outb(val, POST_PORT);
index b211097..16ae2ff 100644 (file)
@@ -250,7 +250,7 @@ void spl_board_init(void)
 {
 }
 
-#if CONFIG_IS_ENABLED(LED) && CONFIG_IS_ENABLED(BOOTSTAGE)
+#if CONFIG_IS_ENABLED(LED) && CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS)
 /*
  * Indicate any error or (accidental?) entering of CLI via the red status LED.
  */
index c948d58..a8d4be2 100644 (file)
@@ -703,6 +703,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"
index 0965b96..eab5ee1 100644 (file)
@@ -166,7 +166,7 @@ void board_init_f_init_reserve(ulong base)
                board_init_f_init_stack_protection();
 }
 
-#if CONFIG_IS_ENABLED(BOOTSTAGE)
+#if CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS)
 /*
  * Board-specific Platform code can reimplement show_boot_progress () if needed
  */
index 0c08da0..99cde66 100644 (file)
@@ -61,7 +61,7 @@ binman_sym_declare(ulong, spl, size);
 /* Define board data structure */
 static struct bd_info bdata __attribute__ ((section(".data")));
 
-#if CONFIG_IS_ENABLED(BOOTSTAGE)
+#if CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS)
 /*
  * Board-specific Platform code can reimplement show_boot_progress () if needed
  */
index f837a38..8d1989a 100644 (file)
@@ -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
 /**