1 // SPDX-License-Identifier: GPL-2.0+
3 * (C) Copyright 2008 - 2013 Tensilica Inc.
4 * (C) Copyright 2014 - 2016 Cadence Design Systems Inc.
13 #include <linux/stringify.h>
14 #include <asm/global_data.h>
15 #include <asm/cache.h>
16 #include <asm/string.h>
19 DECLARE_GLOBAL_DATA_PTR;
21 gd_t *gd __attribute__((section(".data")));
23 #if defined(CONFIG_DISPLAY_CPUINFO)
25 * Print information about the CPU.
28 int print_cpuinfo(void)
30 char buf[120], mhz[8];
33 asm volatile ("rsr %0, 176\n"
35 : "=r"(id0), "=r"(id1));
37 sprintf(buf, "CPU: Xtensa %s (id: %08x:%08x) at %s MHz\n",
38 XCHAL_CORE_ID, id0, id1, strmhz(mhz, gd->cpu_clk));
44 int arch_cpu_init(void)
46 gd->ram_size = CONFIG_SYS_SDRAM_SIZE;