]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: imx: Enable instruction cache early on on i.MX8M
authorMarek Vasut <marex@denx.de>
Tue, 12 Apr 2022 22:41:52 +0000 (00:41 +0200)
committerStefano Babic <sbabic@denx.de>
Wed, 13 Apr 2022 07:35:33 +0000 (09:35 +0200)
Enable instruction cache early on to speed up the boot process on i.MX8M.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
arch/arm/mach-imx/imx8m/soc.c

index 75559e3b799628809267efab9bc32aa38a027e2f..ef5add0e658de6e521599531824b921b99cb116a 100644 (file)
@@ -551,6 +551,11 @@ EVENT_SPY(EVT_DM_POST_INIT, imx8m_check_clock);
 int arch_cpu_init(void)
 {
        struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR;
+
+#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
+       icache_enable();
+#endif
+
        /*
         * ROM might disable clock for SCTR,
         * enable the clock before timer_init.