arm: spear: Enable caches on SPEAr
authorStefan Roese <sr@denx.de>
Tue, 18 Aug 2015 07:27:19 +0000 (09:27 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 28 Aug 2015 16:33:17 +0000 (12:33 -0400)
The designware ethernet driver supports d-cache now. So there is nothing
stopping us now to enable the caches completely on SPEAr.

Tested on SPEAr600 x600 board.

Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Vipin Kumar <vk.vipin@gmail.com>
arch/arm/cpu/arm926ejs/spear/cpu.c

index 3037084b29bce7cdae69b31a65f25eb79bb7dba0..e39cdbaa6e5110f056222fee6dd413b093f0fbbd 100644 (file)
@@ -56,6 +56,16 @@ int arch_cpu_init(void)
        return 0;
 }
 
+void enable_caches(void)
+{
+#ifndef CONFIG_SYS_ICACHE_OFF
+       icache_enable();
+#endif
+#ifndef CONFIG_SYS_DCACHE_OFF
+       dcache_enable();
+#endif
+}
+
 #ifdef CONFIG_DISPLAY_CPUINFO
 int print_cpuinfo(void)
 {