All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] spl: use different BOARD_INIT MACRO for spl and tpl
@ 2018-01-20 10:00 Kever Yang
  2018-01-20 13:06 ` Dr. Philipp Tomsich
  2018-01-28 18:53 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Kever Yang @ 2018-01-20 10:00 UTC (permalink / raw)
  To: u-boot

SPL and TPL may not always need spl_board_init() at the same time.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---

 common/spl/Kconfig | 7 +++++++
 common/spl/spl.c   | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 7aae826..3e6f526 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -754,6 +754,13 @@ config TPL
 
 if TPL
 
+config TPL_BOARD_INIT
+	bool "Call board-specific initialization in TPL"
+	help
+	  If this option is enabled, U-Boot will call the function
+	  spl_board_init() from board_init_r(). This function should be
+	  provided by the board.
+
 config TPL_LDSCRIPT
         string "Linker script for the TPL stage"
 	depends on TPL
diff --git a/common/spl/spl.c b/common/spl/spl.c
index ac2c6ca..ec6ac69 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -395,7 +395,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
 	timer_init();
 #endif
 
-#ifdef CONFIG_SPL_BOARD_INIT
+#if CONFIG_IS_ENABLED(BOARD_INIT)
 	spl_board_init();
 #endif
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] spl: use different BOARD_INIT MACRO for spl and tpl
  2018-01-20 10:00 [U-Boot] [PATCH] spl: use different BOARD_INIT MACRO for spl and tpl Kever Yang
@ 2018-01-20 13:06 ` Dr. Philipp Tomsich
  2018-01-28 18:53 ` [U-Boot] " Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Dr. Philipp Tomsich @ 2018-01-20 13:06 UTC (permalink / raw)
  To: u-boot


> On 20 Jan 2018, at 11:00, Kever Yang <kever.yang@rock-chips.com> wrote:
> 
> SPL and TPL may not always need spl_board_init() at the same time.
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>

Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] spl: use different BOARD_INIT MACRO for spl and tpl
  2018-01-20 10:00 [U-Boot] [PATCH] spl: use different BOARD_INIT MACRO for spl and tpl Kever Yang
  2018-01-20 13:06 ` Dr. Philipp Tomsich
@ 2018-01-28 18:53 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2018-01-28 18:53 UTC (permalink / raw)
  To: u-boot

On Sat, Jan 20, 2018 at 06:00:26PM +0800, Kever Yang wrote:

> SPL and TPL may not always need spl_board_init() at the same time.
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180128/5c5d99c9/attachment.sig>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-28 18:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-20 10:00 [U-Boot] [PATCH] spl: use different BOARD_INIT MACRO for spl and tpl Kever Yang
2018-01-20 13:06 ` Dr. Philipp Tomsich
2018-01-28 18:53 ` [U-Boot] " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.