]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: Add SPL build check to SPL early bss clear
authorBrian Moyer <bdm310@gmail.com>
Sun, 26 Jul 2020 20:17:53 +0000 (13:17 -0700)
committerTom Rini <trini@konsulko.com>
Wed, 5 Aug 2020 03:30:02 +0000 (23:30 -0400)
SPL_CLEAR_BSS is called regardless of build type if
CONFIG_SPL_EARLY_BSS is defined. Add a guard for CONFIG_SPL_BUILD
to fix.

Signed-off-by: Brian Moyer <bdm310@gmail.com>
arch/arm/lib/crt0.S

index df9dd83e40932dd069becf5e7066be0931094c0e..46b6be21a8df8a3acd89568c319f8220b8f80428 100644 (file)
@@ -64,7 +64,7 @@
  * can afford it due to sufficient memory being available early.
  */
 
-.macro SPL_CLEAR_BSS
+.macro CLEAR_BSS
        ldr     r0, =__bss_start        /* this is auto-relocated! */
 
 #ifdef CONFIG_USE_ARCH_MEMSET
@@ -109,8 +109,8 @@ ENTRY(_main)
        mov     r9, r0
        bl      board_init_f_init_reserve
 
-#if defined(CONFIG_SPL_EARLY_BSS)
-       SPL_CLEAR_BSS
+#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_EARLY_BSS)
+       CLEAR_BSS
 #endif
 
        mov     r0, #0
@@ -150,8 +150,8 @@ here:
 #endif
 #if !defined(CONFIG_SPL_BUILD) || CONFIG_IS_ENABLED(FRAMEWORK)
 
-#if !defined(CONFIG_SPL_EARLY_BSS)
-       SPL_CLEAR_BSS
+#if !defined(CONFIG_SPL_BUILD) || !defined(CONFIG_SPL_EARLY_BSS)
+       CLEAR_BSS
 #endif
 
 # ifdef CONFIG_SPL_BUILD