omap-common cache enabling sequence relies on cpu_init_cp15()
(inside start.S) for enabling I-caches. But cpu_init_cp15()
can be skipped if CONFIG_SKIP_LOWLEVEL_INIT is defined. So
enable I-caches if not enabled already.

Debugged-by: Jean-Jacques Hiblot <jjhib...@ti.com>
Tested-by: Steve Kipisz <s-kipi...@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvu...@ti.com>
---
 arch/arm/mach-omap2/omap-cache.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/omap-cache.c b/arch/arm/mach-omap2/omap-cache.c
index b37163a4f3..975ee1b020 100644
--- a/arch/arm/mach-omap2/omap-cache.c
+++ b/arch/arm/mach-omap2/omap-cache.c
@@ -44,7 +44,11 @@ DECLARE_GLOBAL_DATA_PTR;
 
 void enable_caches(void)
 {
-       /* Enable D-cache. I-cache is already enabled in start.S */
+
+       /* Enable I cache if not enabled */
+       if (!icache_status())
+               icache_enable();
+
        dcache_enable();
 }
 
-- 
2.17.0

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to