diff mbox series

[10/13] arm: omap3: Compile s_init() function only when it is used

Message ID 20201129165207.6194-1-pali@kernel.org
State Superseded
Delegated to: Marek Vasut
Headers show
Series Nokia RX-51: Fix USB TTY console and enable it | expand

Commit Message

Pali Rohár Nov. 29, 2020, 4:52 p.m. UTC
Function s_init() is called only from lowlevel_init(). So compile it only
when function lowlevel_init() is compiled.

Signed-off-by: Pali Rohár <pali@kernel.org>
---
 arch/arm/mach-omap2/omap3/board.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Pavel Machek Nov. 29, 2020, 6 p.m. UTC | #1
On Sun 2020-11-29 17:52:07, Pali Rohár wrote:
> Function s_init() is called only from lowlevel_init(). So compile it only
> when function lowlevel_init() is compiled.
> 
> Signed-off-by: Pali Rohár <pali@kernel.org>

Reviewed-by: Pavel Machek <pavel@ucw.cz>
diff mbox series

Patch

diff --git a/arch/arm/mach-omap2/omap3/board.c b/arch/arm/mach-omap2/omap3/board.c
index f08c8ab43a..9ea219fafc 100644
--- a/arch/arm/mach-omap2/omap3/board.c
+++ b/arch/arm/mach-omap2/omap3/board.c
@@ -179,6 +179,8 @@  void early_system_init(void)
 	hw_data_init();
 }
 
+#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && \
+	!defined(CONFIG_SKIP_LOWLEVEL_INIT_ONLY)
 /******************************************************************************
  * Routine: s_init
  * Description: Does early system init of muxing and clocks.
@@ -207,6 +209,7 @@  void s_init(void)
 	ehci_clocks_enable();
 #endif
 }
+#endif
 
 #ifdef CONFIG_SPL_BUILD
 void board_init_f(ulong dummy)