1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2013-2014, 2018 Synopsys, Inc. All rights reserved.
7 #include <asm/arcregs.h>
10 DECLARE_GLOBAL_DATA_PTR;
12 int arch_cpu_init(void)
16 gd->cpu_clk = CONFIG_SYS_CLK_FREQ;
17 gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
24 int arch_early_init_r(void)
26 gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
27 gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
31 /* This is a dummy function on arc */
37 #ifdef CONFIG_DISPLAY_CPUINFO
38 const char *decode_identity(void)
40 int arcver = read_aux_reg(ARC_AUX_IDENTITY) & 0xff;
44 case 0x32: return "ARC 700 v4.4-4.5";
45 case 0x33: return "ARC 700 v4.6-v4.9";
46 case 0x34: return "ARC 700 v4.10";
47 case 0x35: return "ARC 700 v4.11";
50 case 0x41: return "ARC EM v1.1a";
51 case 0x42: return "ARC EM v3.0";
52 case 0x43: return "ARC EM v4.0";
53 case 0x50: return "ARC HS v1.0";
54 case 0x51: return "ARC EM v2.0";
55 case 0x52: return "ARC EM v2.1";
56 case 0x53: return "ARC HS v3.0";
57 case 0x54: return "ARC HS v4.0";
59 default: return "Unknown ARC core";
63 __weak int print_cpuinfo(void)
65 printf("CPU: %s\n", decode_identity());
68 #endif /* CONFIG_DISPLAY_CPUINFO */