diff mbox

[U-Boot,v1,07/12] bootstage: call show_boot_progress also in SPL

Message ID 1463581128-22188-8-git-send-email-hs@denx.de
State Accepted
Commit 496c5483e9ad80d34ff0d9ee9abb813e51be2237
Headers show

Commit Message

Heiko Schocher May 18, 2016, 2:18 p.m. UTC
show_boot_progress() is now called from SPL also.

Signed-off-by: Heiko Schocher <hs@denx.de>
---

 common/init/board_init.c | 5 +++++
 common/spl/spl.c         | 5 +++++
 include/bootstage.h      | 6 +++---
 3 files changed, 13 insertions(+), 3 deletions(-)

Comments

Simon Glass May 19, 2016, 4:02 a.m. UTC | #1
On 18 May 2016 at 08:18, Heiko Schocher <hs@denx.de> wrote:
> show_boot_progress() is now called from SPL also.
>
> Signed-off-by: Heiko Schocher <hs@denx.de>
> ---
>
>  common/init/board_init.c | 5 +++++
>  common/spl/spl.c         | 5 +++++
>  include/bootstage.h      | 6 +++---
>  3 files changed, 13 insertions(+), 3 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox

Patch

diff --git a/common/init/board_init.c b/common/init/board_init.c
index d17bb29..ef01a9a 100644
--- a/common/init/board_init.c
+++ b/common/init/board_init.c
@@ -146,3 +146,8 @@  void board_init_f_init_reserve(ulong base)
 	base += CONFIG_SYS_MALLOC_F_LEN;
 #endif
 }
+
+/*
+ * Board-specific Platform code can reimplement show_boot_progress () if needed
+ */
+__weak void show_boot_progress(int val) {}
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 82e7f58..de33436 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -36,6 +36,11 @@  struct spl_image_info spl_image;
 static bd_t bdata __attribute__ ((section(".data")));
 
 /*
+ * Board-specific Platform code can reimplement show_boot_progress () if needed
+ */
+__weak void show_boot_progress(int val) {}
+
+/*
  * Default function to determine if u-boot or the OS should
  * be started. This implementation always returns 1.
  *
diff --git a/include/bootstage.h b/include/bootstage.h
index 9765360..4b929e2 100644
--- a/include/bootstage.h
+++ b/include/bootstage.h
@@ -212,7 +212,9 @@  enum bootstage_id {
  */
 ulong timer_get_boot_us(void);
 
-#if !defined(CONFIG_SPL_BUILD) && !defined(USE_HOSTCC)
+#if defined(USE_HOSTCC)
+#define show_boot_progress(val) do {} while (0)
+#else
 /*
  * Board code can implement show_boot_progress() if needed.
  *
@@ -220,8 +222,6 @@  ulong timer_get_boot_us(void);
  *		has occurred.
  */
 void show_boot_progress(int val);
-#else
-#define show_boot_progress(val) do {} while (0)
 #endif
 
 #if defined(CONFIG_BOOTSTAGE) && !defined(CONFIG_SPL_BUILD) && \