2 * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
4 * SPDX-License-Identifier: GPL-2.0+
8 #include <asm/arcregs.h>
11 DECLARE_GLOBAL_DATA_PTR;
13 int arch_cpu_init(void)
15 #ifdef CONFIG_SYS_ICACHE_OFF
19 invalidate_icache_all();
23 #ifdef CONFIG_SYS_DCACHE_OFF
30 /* In simulation (ISS) "CHIPID" and "ARCNUM" are all "ff" */
31 if ((read_aux_reg(ARC_AUX_IDENTITY) & 0xffffff00) == 0xffffff00)
32 gd->arch.running_on_hw = 0;
34 gd->arch.running_on_hw = 1;
36 gd->cpu_clk = CONFIG_SYS_CLK_FREQ;
37 gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
42 int arch_early_init_r(void)
44 gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
45 gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;