imx: Enable ACTLR.SMP in SPL for i.MX6
Subsystems (3)
PATCH RESEND 1/1 imx: Enable ACTLR.SMP in SPL for i.MX6
Similar to what has been done before with c5437e5b for u-boot proper, we enable the SMP bit for SPL as well. This is necessary when SDP booting straight into Linux, i.e. falcon boot. When SDP boot mode is active, the ROM code does not set this bit which makes the caches not work once activated in Linux.
---
arch/arm/include/asm/mach-imx/sys_proto.h | 5 +++++ arch/arm/mach-imx/cache.c | 2 +- arch/arm/mach-imx/mx6/soc.c | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-)
arch/arm/include/asm/mach-imx/sys_proto.h +5 -0
@@ -236,4 +236,9 @@ unsigned long call_imx_sip_ret2(unsigned long id, unsigned long reg0, unsigned long reg3);void imx_get_mac_from_fuse (int dev_id,unsigned char *mac); + +#if defined(CONFIG_MX6 ) || defined(CONFIG_MX7 ) +void enable_ca7_smp (void ); +#endif +#endif
arch/arm/mach-imx/cache.c +1 -1
@@ -11,7 +11,7 @@#include <asm/io.h> #include <asm/mach-imx/sys_proto.h> -static void enable_ca7_smp (void ) +void enable_ca7_smp (void ) {u32 val;
arch/arm/mach-imx/mx6/soc.c +3 -0
@@ -487,6 +487,9 @@ int arch_cpu_init(void)if (is_mx6dqp ())noc_setup ();#endif + +enable_ca7_smp (); +return 0 ; }
Signature · 1 line
2.34.1
Fabio Estevam
reviewerHi Sven,
Thanks for your patch.
Quoted 6 lines · Sven Schwermer
Similar to what has been done before with
c5437e5bfor u-boot proper, we enable the SMP bit for SPL as well. This is necessary when SDP booting straight into Linux, i.e. falcon boot. When SDP boot mode is active, the ROM code does not set this bit which makes the caches not work once activated in Linux.
I suggest adding the data about the boot time difference that you noticed when booting
FIT image via SPL in falcon mode versus U-Boot proper (1.2s versus 5s).
Quoted 13 lines
Signed-off-by Sven Schwermer <[email protected]>---
arch/arm/include/asm/mach-imx/sys_proto.h | 5 +++++ arch/arm/mach-imx/cache.c | 2 +- arch/arm/mach-imx/mx6/soc.c | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-)arch/arm/include/asm/mach-imx/sys_proto.h +0
-0
arch/arm/include/asm/mach-imx/sys_proto.h unsigned long call_imx_sip_ret2(unsigned long id, unsigned long reg0, · line 240
Quoted 5 lines
arch/arm/include/asm/mach-imx/sys_proto.h +2
-0@@ -236,4 +236,9 @@ unsigned long call_imx_sip_ret2(unsigned long id, unsigned long reg0, unsigned long reg3);void imx_get_mac_from_fuse (int dev_id,unsigned char *mac); + +#if defined(CONFIG_MX6 ) || defined(CONFIG_MX7 )
Please add || defined(CONFIG_MX7ULP) too.
Quoted 22 lines
arch/arm/include/asm/mach-imx/sys_proto.h +3
-0+void enable_ca7_smp (void ); +#endif +#endif arch/arm/mach-imx/cache.c +1
-1@@ -11,7 +11,7 @@#include <asm/io.h> #include <asm/mach-imx/sys_proto.h> -static void enable_ca7_smp (void ) +void enable_ca7_smp (void ) {u32 val;arch/arm/mach-imx/mx6/soc.c +0
-0
arch/arm/mach-imx/mx6/soc.c int arch_cpu_init(void) · line 492
Quoted 6 lines
arch/arm/mach-imx/mx6/soc.c +3
-0@@ -487,6 +487,9 @@ int arch_cpu_init(void)if (is_mx6dqp ())noc_setup ();#endif + +enable_ca7_smp (); +
Since this affects all i.MX Cortex-A7 devices, please also add enable_ca7_smp() in:arch/arm/mach-imx/mx7/soc.c arch/arm/mach-imx/mx7ulp/soc.c
Thanks