[PATCH] mx7ulp: soc: s_init should only be executed once
> 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 > Reviewed-by: Fabio Estevam Applied to u-boot-imx, master, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de =
Re: [PATCH] mx7ulp: soc: s_init should only be executed once
Hi Jorge, On Sun, Jan 19, 2020 at 3:52 PM Jorge Ramirez-Ortiz, Foundries wrote: > hi Favio/all > > plese could you confirm if this patch will be merged (just so we dont have to > carry it separately in our product branches) Yes, I think it makes sense to apply it. I have already given my Reviewed-by tag.
Re: [PATCH] mx7ulp: soc: s_init should only be executed once
On 17/01/20 13:08:44, Jorge Ramirez-Ortiz, Gmail wrote: > On 17/01/20 08:53:03, Fabio Estevam wrote: > > Hi Jorge, > > > > On Fri, Jan 17, 2020 at 6:50 AM Jorge Ramirez-Ortiz > > wrote: > > > > > > 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 > > > > The target I use to test LDO-enabled mode does not use SPL, so that's > > why I did not notice the problem. > > > > Thanks for the fix: > > Hi Favio, > > sorry I forgot to mention: this does not fix the issue I see when executing > the LDO init code - that still locks when run from SPL or U-Boot. > This commit is just because I noticed that s_init was being called twice (for > SPL and U-Boot) and I dont think it makes sense. > > > > > Reviewed-by: Fabio Estevam hi Favio/all plese could you confirm if this patch will be merged (just so we dont have to carry it separately in our product branches) thanks! Jorge
Re: [PATCH] mx7ulp: soc: s_init should only be executed once
On 17/01/20 08:53:03, Fabio Estevam wrote: > Hi Jorge, > > On Fri, Jan 17, 2020 at 6:50 AM Jorge Ramirez-Ortiz > wrote: > > > > 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 > > The target I use to test LDO-enabled mode does not use SPL, so that's > why I did not notice the problem. > > Thanks for the fix: Hi Favio, sorry I forgot to mention: this does not fix the issue I see when executing the LDO init code - that still locks when run from SPL or U-Boot. This commit is just because I noticed that s_init was being called twice (for SPL and U-Boot) and I dont think it makes sense. > > Reviewed-by: Fabio Estevam
Re: [PATCH] mx7ulp: soc: s_init should only be executed once
Hi Jorge, On Fri, Jan 17, 2020 at 6:50 AM Jorge Ramirez-Ortiz wrote: > > 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 The target I use to test LDO-enabled mode does not use SPL, so that's why I did not notice the problem. Thanks for the fix: Reviewed-by: Fabio Estevam
[PATCH] mx7ulp: soc: s_init should only be executed once
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 --- 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