U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Cc: Marek Vasut <marex@denx.de>, Simon Glass <sjg@chromium.org>
Subject: [PATCH] bootstage: Add SPL support
Date: Tue, 14 Sep 2021 05:19:35 +0200	[thread overview]
Message-ID: <20210914031935.273427-1-marex@denx.de> (raw)

Allow usage of the bootstage facilities in SPL.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@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


             reply	other threads:[~2021-09-14  3:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-14  3:19 Marek Vasut [this message]
2021-09-18  9:30 ` [PATCH] bootstage: Add SPL support Simon Glass
2021-09-24 18:36 ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210914031935.273427-1-marex@denx.de \
    --to=marex@denx.de \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox