imx: Enable ACTLR.SMP in SPL for i.MX6/7
Subsystems (3)
PATCH v2 1/1 imx: Enable ACTLR.SMP in SPL for i.MX6/7
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.
On an i.MX6ULL (528MHz), this reduces a minimal kernel's boot time into an initramfs shell from ~6.1s down to ~1.2s.
---
Changes in v2:
- Apply fix for i.MX7(ULP) as well
- Document quantitive improvement in boot time
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 +++ arch/arm/mach-imx/mx7/soc.c | 3 +++ arch/arm/mach-imx/mx7ulp/soc.c | 2 ++ 5 files changed, 14 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 ) || defined(CONFIG_MX7ULP ) +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 ; }
arch/arm/mach-imx/mx7/soc.c +3 -0
@@ -14,6 +14,7 @@#include <asm/mach-imx/rdc-sema.h> #include <asm/arch/imx-rdc.h> #include <asm/mach-imx/boot_mode.h> +#include <asm/mach-imx/sys_proto.h> #include <asm/arch/crm_regs.h> #include <asm/bootm.h> #include <dm.h>
@@ -323,6 +324,8 @@ int arch_cpu_init(void)imx_gpcv2_init (); +enable_ca7_smp (); + return 0; }#else
arch/arm/mach-imx/mx7ulp/soc.c +2 -0
@@ -13,6 +13,7 @@#include <asm/arch/sys_proto.h> #include <asm/mach-imx/boot_mode.h> #include <asm/mach-imx/hab.h> +#include <asm/mach-imx/sys_proto.h> #include <asm/setup.h> #include <linux/bitops.h>
@@ -77,6 +78,7 @@ enum bt_mode get_boot_mode(void)int arch_cpu_init (void ) { +enable_ca7_smp ();return 0 ; }
Signature · 1 line
2.34.1
Hi Sven,
Quoted 10 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.On an i.MX6ULL (528MHz), this reduces a minimal kernel's boot time into an initramfs shell from ~6.1s down to ~1.2s.
Quoted 6 lines
Signed-off-by Sven Schwermer <[email protected]>---
Changes in v2:
- Apply fix fori.MX7(ULP)as well
- Document quantitive improvement in boot time
Thanks for the updated version. It looks good to me:
PATCH v2 1/1 imx: Enable ACTLR.SMP in SPL for i.MX6/7
In reply to Sven SchwermerQuoted 9 lines
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.
On an i.MX6ULL (528MHz), this reduces a minimal kernel's boot time into an initramfs shell from ~6.1s down to ~1.2s.Signed-off-by Sven Schwermer <[email protected]>Reviewed-by Fabio Estevam <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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: [email protected] =====================================================================