]> git.sur5r.net Git - u-boot/blobdiff - arch/arc/lib/cpu.c
SPDX: Convert all of our single license tags to Linux Kernel style
[u-boot] / arch / arc / lib / cpu.c
index 50634b860f79580011b4701e3ff051cb1ec97c7c..cb95e06e93118dcd589304796122832d21748be8 100644 (file)
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -12,30 +11,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;
 }
 
@@ -45,3 +27,9 @@ int arch_early_init_r(void)
        gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
        return 0;
 }
+
+/* This is a dummy function on arc */
+int dram_init(void)
+{
+       return 0;
+}