]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mx7ulp: soc: s_init should only be executed once
authorJorge Ramirez-Ortiz <jorge@foundries.io>
Fri, 17 Jan 2020 09:50:25 +0000 (10:50 +0100)
committerStefano Babic <sbabic@denx.de>
Mon, 20 Jan 2020 14:38:16 +0000 (15:38 +0100)
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>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
arch/arm/mach-imx/mx7ulp/soc.c

index 8345b01398bdf0545dbb55dee4159b0d80544715..316262f71b856b351fa9d80618b4fddfe5fe0c9a 100644 (file)
@@ -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)