public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] mx7ulp: soc: s_init should only be executed once
@ 2020-01-17  9:50 Jorge Ramirez-Ortiz
  2020-01-17 11:53 ` Fabio Estevam
  2020-01-20 20:18 ` sbabic at denx.de
  0 siblings, 2 replies; 6+ messages in thread
From: Jorge Ramirez-Ortiz @ 2020-01-17  9:50 UTC (permalink / raw)
  To: u-boot

On SPL enabled systems, the current s_init code (wdog, clock and ldo
init) is executed twice (by SPL and u-boot). This is not necessary and
might lead to boot issues (ie, starting PMC1 when it is already running).

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
---
 arch/arm/mach-imx/mx7ulp/soc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-imx/mx7ulp/soc.c b/arch/arm/mach-imx/mx7ulp/soc.c
index 8345b01398..316262f71b 100644
--- a/arch/arm/mach-imx/mx7ulp/soc.c
+++ b/arch/arm/mach-imx/mx7ulp/soc.c
@@ -117,6 +117,7 @@ void init_wdog(void)
 	disable_wdog(WDG2_RBASE);
 }
 
+#if !defined(CONFIG_SPL) || (defined(CONFIG_SPL) && defined(CONFIG_SPL_BUILD))
 #if defined(CONFIG_LDO_ENABLED_MODE)
 static void init_ldo_mode(void)
 {
@@ -174,6 +175,7 @@ void s_init(void)
 #endif
 	return;
 }
+#endif
 
 #ifndef CONFIG_ULP_WATCHDOG
 void reset_cpu(ulong addr)
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-01-20 20:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-17  9:50 [PATCH] mx7ulp: soc: s_init should only be executed once Jorge Ramirez-Ortiz
2020-01-17 11:53 ` Fabio Estevam
2020-01-17 12:08   ` Jorge
2020-01-19 18:52     ` Jorge
2020-01-19 23:23       ` Fabio Estevam
2020-01-20 20:18 ` sbabic at denx.de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox