1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * A lowlevel_init function that sets up the stack to call a C function to
4 * perform further init.
7 * Texas Instruments, <www.ti.com>
10 * Aneesh V <aneesh@ti.com>
13 #include <asm-offsets.h>
15 #include <linux/linkage.h>
17 .pushsection .text.s_init, "ax"
23 .pushsection .text.lowlevel_init, "ax"
26 * Setup a temporary stack. Global data is not available yet.
28 #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_STACK)
29 ldr sp, =CONFIG_SPL_STACK
31 ldr sp, =CONFIG_SYS_INIT_SP_ADDR
33 bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
38 * Set up global data for boards that still need it. This will be
41 #ifdef CONFIG_SPL_BUILD
50 * Save the old lr(passed in ip) and the current lr to stack
55 * Call the very early init function. This should do only the
56 * absolute bare minimum to get started. It should not:
61 * - try to start a console
63 * For boards with SPL this should be empty since SPL can do all of
64 * this init in the SPL board_init_f() function which is called
65 * immediately after this.
69 ENDPROC(lowlevel_init)