[U-Boot] [RFC PATCH 06/20] sandbox: Allow board_init_f() and board_init_r() to return

Simon Glass sjg at chromium.org
Sat Sep 17 18:48:45 CEST 2011


Since the sandbox architecture doesn't do relocation, we prefer to call
board_init_r() explicitly when board_init_f() returns. Similarly we
prefer to call main_loop() when board_init_r returns.

Signed-off-by: Simon Glass <sjg at chromium.org>
---
 include/common.h |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/include/common.h b/include/common.h
index 2a39df3..7ae9bcf 100644
--- a/include/common.h
+++ b/include/common.h
@@ -262,8 +262,13 @@ void	init_cmd_timeout(void);
 void	reset_cmd_timeout(void);
 
 /* arch/$(ARCH)/lib/board.c */
-void	board_init_f  (ulong) __attribute__ ((noreturn));
-void	board_init_r  (gd_t *, ulong) __attribute__ ((noreturn));
+#ifdef CONFIG_SANDBOX
+void	board_init_f(ulong);
+void	board_init_r(gd_t *, ulong);
+#else
+void	board_init_f(ulong) __attribute__ ((noreturn));
+void	board_init_r(gd_t *, ulong) __attribute__ ((noreturn));
+#endif
 int	checkboard    (void);
 int	checkflash    (void);
 int	checkdram     (void);
-- 
1.7.3.1



More information about the U-Boot mailing list