2 * A lowlevel_init function that sets up the stack to call a C function to
3 * perform further init.
6 * Texas Instruments, <www.ti.com>
9 * Aneesh V <aneesh@ti.com>
11 * SPDX-License-Identifier: GPL-2.0+
14 #include <asm-offsets.h>
16 #include <linux/linkage.h>
18 .pushsection .text.s_init, "ax"
24 .pushsection .text.lowlevel_init, "ax"
27 * Setup a temporary stack. Global data is not available yet.
29 #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_STACK)
30 ldr sp, =CONFIG_SPL_STACK
32 ldr sp, =CONFIG_SYS_INIT_SP_ADDR
34 bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
39 * Set up global data for boards that still need it. This will be
42 #ifdef CONFIG_SPL_BUILD
51 * Save the old lr(passed in ip) and the current lr to stack
56 * Call the very early init function. This should do only the
57 * absolute bare minimum to get started. It should not:
62 * - try to start a console
64 * For boards with SPL this should be empty since SPL can do all of
65 * this init in the SPL board_init_f() function which is called
66 * immediately after this.
70 ENDPROC(lowlevel_init)