summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2021-02-07 16:50:12 +0300
committerMarek Vasut <marex@denx.de>2021-03-03 06:12:46 +0300
commit628680a99f21f6f60415d9e6d0e4b6adfb873c62 (patch)
treedff593cae9c813f61aaa898a569680f9515680b9 /arch/arm/mach-omap2
parent7f98575b7ba8ee941c5f2875ca01ae1f08bfae35 (diff)
downloadu-boot-628680a99f21f6f60415d9e6d0e4b6adfb873c62.tar.xz
arm: omap3: Compile lowlevel_init() function only when it is used
Function lowlevel_init() is called only from cpu_init_crit() and this function is wrapped into #if .. #endif section. So compile also lowlevel_init() function under same #if condition. Function cpy_clk_code() uses lowlevel_init symbol to get address where go_to_speed code ends. As this symbol is not available anymore when compiling with CONFIG_SKIP_LOWLEVEL_INIT, defines a new label go_to_speed_end at the place where go_to_speed code ends. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Lukasz Majewski <lukma@denx.de> Acked-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/omap3/lowlevel_init.S6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/omap3/lowlevel_init.S b/arch/arm/mach-omap2/omap3/lowlevel_init.S
index 2a05b5e521..4fa89418a1 100644
--- a/arch/arm/mach-omap2/omap3/lowlevel_init.S
+++ b/arch/arm/mach-omap2/omap3/lowlevel_init.S
@@ -45,7 +45,7 @@ ENDPROC(do_omap3_emu_romcode_call)
ENTRY(cpy_clk_code)
/* Copy DPLL code into SRAM */
adr r0, go_to_speed /* copy from start of go_to_speed... */
- adr r2, lowlevel_init /* ... up to start of low_level_init */
+ adr r2, go_to_speed_end /* ... up to start of go_to_speed_end */
next2:
ldmia r0!, {r3 - r10} /* copy from source address [r0] */
stmia r1!, {r3 - r10} /* copy to target address [r1] */
@@ -167,8 +167,11 @@ pll_div_add5:
pll_div_val5:
.word CLSEL1_EMU_VAL
+go_to_speed_end:
#endif
+#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && \
+ !defined(CONFIG_SKIP_LOWLEVEL_INIT_ONLY)
ENTRY(lowlevel_init)
ldr sp, SRAM_STACK
str ip, [sp] /* stash ip register */
@@ -187,6 +190,7 @@ ENTRY(lowlevel_init)
b s_init
ENDPROC(lowlevel_init)
+#endif
/* the literal pools origin */
.ltorg