]> git.sur5r.net Git - u-boot/blobdiff - arch/arc/lib/cpu.c
arc/cache: Flush & invalidate all caches right before enabling IOC
[u-boot] / arch / arc / lib / cpu.c
index 50634b860f79580011b4701e3ff051cb1ec97c7c..d1f10abb6850b803cdf84eb7c6b1f1a1b4e1fd99 100644 (file)
@@ -12,30 +12,13 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int arch_cpu_init(void)
 {
-#ifdef CONFIG_SYS_ICACHE_OFF
-       icache_disable();
-#else
-       icache_enable();
-       invalidate_icache_all();
-#endif
-
-       flush_dcache_all();
-#ifdef CONFIG_SYS_DCACHE_OFF
-       dcache_disable();
-#else
-       dcache_enable();
-#endif
        timer_init();
 
-/* In simulation (ISS) "CHIPID" and "ARCNUM" are all "ff" */
-       if ((read_aux_reg(ARC_AUX_IDENTITY) & 0xffffff00) == 0xffffff00)
-               gd->arch.running_on_hw = 0;
-       else
-               gd->arch.running_on_hw = 1;
-
        gd->cpu_clk = CONFIG_SYS_CLK_FREQ;
        gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
 
+       cache_init();
+
        return 0;
 }