X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=arch%2Farm%2Fcpu%2Farmv7%2Flowlevel_init.S;h=ba4b374a8bd9a5315bf3065e5e7715a72458d50c;hb=62a09f45ab824c5fdebf0217c774bededf223232;hp=427b0b132165b8003233a3280e097b02a4891e0b;hpb=b79dadf846e5e140e261bbfa4decd024357702d7;p=oweals%2Fu-boot.git diff --git a/arch/arm/cpu/armv7/lowlevel_init.S b/arch/arm/cpu/armv7/lowlevel_init.S index 427b0b1321..ba4b374a8b 100644 --- a/arch/arm/cpu/armv7/lowlevel_init.S +++ b/arch/arm/cpu/armv7/lowlevel_init.S @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * A lowlevel_init function that sets up the stack to call a C function to * perform further init. @@ -7,21 +8,30 @@ * * Author : * Aneesh V - * - * SPDX-License-Identifier: GPL-2.0+ */ #include #include #include -ENTRY(lowlevel_init) +.pushsection .text.s_init, "ax" +WEAK(s_init) + bx lr +ENDPROC(s_init) +.popsection + +.pushsection .text.lowlevel_init, "ax" +WEAK(lowlevel_init) /* * Setup a temporary stack. Global data is not available yet. */ +#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_STACK) + ldr sp, =CONFIG_SPL_STACK +#else ldr sp, =CONFIG_SYS_INIT_SP_ADDR +#endif bic sp, sp, #7 /* 8-byte alignment for ABI compliance */ -#ifdef CONFIG_DM +#ifdef CONFIG_SPL_DM mov r9, #0 #else /* @@ -57,3 +67,4 @@ ENTRY(lowlevel_init) bl s_init pop {ip, pc} ENDPROC(lowlevel_init) +.popsection