From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Sat, 6 Feb 2021 16:21:14 +0100 Subject: [RESEND PATCH 12/16] arm: omap3: Compile lowlevel_init() function only when it is used In-Reply-To: <20210205191212.7644-13-pali@kernel.org> References: <20210205191212.7644-1-pali@kernel.org> <20210205191212.7644-13-pali@kernel.org> Message-ID: <20210206162114.4ae66247@jawa> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, 5 Feb 2021 20:12:08 +0100 Pali Roh?r wrote: > 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. > > Signed-off-by: Pali Roh?r > --- > arch/arm/mach-omap2/omap3/lowlevel_init.S | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > 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 Reviewed-by: Lukasz Majewski Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: