diff mbox series

board_f: Make clear_bss generic

Message ID 20200205065442.27813-1-ovpanait@gmail.com
State Accepted
Commit fbf9c154a6d9c600b355076c33f60781ddbd34f2
Headers show
Series board_f: Make clear_bss generic | expand

Commit Message

Ovidiu Panait Feb. 5, 2020, 6:54 a.m. UTC
clear_bss is already used by 3 arches (x86, arc, xtensa), so make it generic
and provide a weak nop stub for it. This also removes arch-specific ifdef
duplications around clear_bss.

Signed-off-by: Ovidiu Panait <ovpanait at gmail.com>
---
 common/board_f.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Comments

Tom Rini Feb. 13, 2020, 10:11 p.m. UTC | #1
On Wed, Feb 05, 2020 at 08:54:42AM +0200, Ovidiu Panait wrote:

> clear_bss is already used by 3 arches (x86, arc, xtensa), so make it generic
> and provide a weak nop stub for it. This also removes arch-specific ifdef
> duplications around clear_bss.
> 
> Signed-off-by: Ovidiu Panait <ovpanait at gmail.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/common/board_f.c b/common/board_f.c
index 8fa26e3ca5..82a164752a 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -867,6 +867,11 @@  __weak int checkcpu(void)
 	return 0;
 }
 
+__weak int clear_bss(void)
+{
+	return 0;
+}
+
 static const init_fnc_t init_sequence_f[] = {
 	setup_mon_len,
 #ifdef CONFIG_OF_CONTROL
@@ -1002,11 +1007,8 @@  static const init_fnc_t init_sequence_f[] = {
 #if defined(CONFIG_X86) || defined(CONFIG_ARC)
 	copy_uboot_to_ram,
 	do_elf_reloc_fixups,
-	clear_bss,
 #endif
-#if defined(CONFIG_XTENSA)
 	clear_bss,
-#endif
 #if !defined(CONFIG_ARM) && !defined(CONFIG_SANDBOX) && \
 		!CONFIG_IS_ENABLED(X86_64)
 	jump_to_copy,