From: Marek Vasut Date: Tue, 12 Apr 2022 22:41:52 +0000 (+0200) Subject: ARM: imx: Enable instruction cache early on on i.MX8M X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=2fa763baa1c;p=u-boot.git ARM: imx: Enable instruction cache early on on i.MX8M Enable instruction cache early on to speed up the boot process on i.MX8M. Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Peng Fan Cc: Stefano Babic --- diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c index 75559e3b79..ef5add0e65 100644 --- a/arch/arm/mach-imx/imx8m/soc.c +++ b/arch/arm/mach-imx/imx8m/soc.c @@ -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.