ARM: dts: stm32: Repair SDMMC1 operation on AV96
[oweals/u-boot.git] / arch / arm / lib / crt0_64.S
index 9cb70552fedad205d0dba215134dbb12324b9906..04afa518acf011b58ae28664e03480b31d6a00c1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * crt0 - C-runtime startup Code for AArch64 U-Boot
  *
@@ -6,8 +7,6 @@
  *
  * (C) Copyright 2012
  * Albert ARIBAUD <albert.u.boot@aribaud.net>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <config.h>
@@ -73,6 +72,9 @@ ENTRY(_main)
        ldr     x0, =(CONFIG_TPL_STACK)
 #elif defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_STACK)
        ldr     x0, =(CONFIG_SPL_STACK)
+#elif defined(CONFIG_INIT_SP_RELATIVE)
+       adr     x0, __bss_start
+       add     x0, x0, #CONFIG_SYS_INIT_SP_BSS_OFFSET
 #else
        ldr     x0, =(CONFIG_SYS_INIT_SP_ADDR)
 #endif
@@ -118,6 +120,7 @@ relocation_return:
  */
        bl      c_runtime_cpu_setup             /* still call old routine */
 #endif /* !CONFIG_SPL_BUILD */
+#if !defined(CONFIG_SPL_BUILD) || CONFIG_IS_ENABLED(FRAMEWORK)
 #if defined(CONFIG_SPL_BUILD)
        bl      spl_relocate_stack_gd           /* may return NULL */
        /* set up gd here, outside any C code, if new stack is returned */
@@ -150,5 +153,6 @@ clear_loop:
        b       board_init_r                    /* PC relative jump */
 
        /* NOTREACHED - board_init_r() does not return */
+#endif
 
 ENDPROC(_main)