[U-Boot] [PATCH 2/3 V3] Make board_init_f under nand_boot.c a weak function

Sughosh Ganu urwithsughosh at gmail.com
Tue Oct 26 19:57:44 CEST 2010


 Enable board_init_f to be overridden with a board
 specific function.

Signed-off-by: Sughosh Ganu <urwithsughosh at gmail.com>
---
Changes since V2:
  * Fix the checkpatch warnings

 nand_spl/nand_boot.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/nand_spl/nand_boot.c b/nand_spl/nand_boot.c
index ccd0af2..01ff3e3 100644
--- a/nand_spl/nand_boot.c
+++ b/nand_spl/nand_boot.c
@@ -222,11 +222,13 @@ static int nand_load(struct mtd_info *mtd, unsigned int offs,
 }
 
 #if defined(CONFIG_ARM) && !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-void board_init_f (ulong bootflag)
+void __board_init_f(ulong bootflag)
 {
-	relocate_code (CONFIG_SYS_TEXT_BASE - TOTAL_MALLOC_LEN, NULL,
-		       CONFIG_SYS_TEXT_BASE);
+	relocate_code(CONFIG_SYS_TEXT_BASE - TOTAL_MALLOC_LEN, NULL,
+			CONFIG_SYS_TEXT_BASE);
 }
+void board_init_f(ulong bootflag)__attribute__((weak,
+						 alias("__board_init_f")));
 #endif
 
 /*
-- 
1.7.0.4



More information about the U-Boot mailing list