All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] ARM: imx: Enable instruction cache early on on i.MX8M
@ 2022-04-12 22:41 Marek Vasut
  2022-04-13  7:47 ` Stefano Babic
  2022-04-13  9:31 ` sbabic
  0 siblings, 2 replies; 3+ messages in thread
From: Marek Vasut @ 2022-04-12 22:41 UTC (permalink / raw)
  To: u-boot, sbabic; +Cc: Marek Vasut, Fabio Estevam, Peng Fan

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>
---
V2: Protect the icache_enable with !CONFIG_IS_ENABLED(SYS_ICACHE_OFF),
    the symbol might be undefined in case CONFIG_(SPL_)SYS_ICACHE_OFF
    is set
---
 arch/arm/mach-imx/imx8m/soc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
index bb94ef51492..8171631db10 100644
--- a/arch/arm/mach-imx/imx8m/soc.c
+++ b/arch/arm/mach-imx/imx8m/soc.c
@@ -550,6 +550,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.
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-13  9:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-12 22:41 [PATCH v2] ARM: imx: Enable instruction cache early on on i.MX8M Marek Vasut
2022-04-13  7:47 ` Stefano Babic
2022-04-13  9:31 ` sbabic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.