2 * (C) Copyright 2008 - 2013 Tensilica Inc.
3 * (C) Copyright 2014 - 2016 Cadence Design Systems Inc.
5 * SPDX-License-Identifier: GPL-2.0+
14 #include <linux/stringify.h>
15 #include <asm/global_data.h>
16 #include <asm/cache.h>
17 #include <asm/string.h>
20 DECLARE_GLOBAL_DATA_PTR;
22 gd_t *gd __attribute__((section(".data")));
24 #if defined(CONFIG_DISPLAY_CPUINFO)
26 * Print information about the CPU.
29 int print_cpuinfo(void)
31 char buf[120], mhz[8];
34 asm volatile ("rsr %0, 176\n"
36 : "=r"(id0), "=r"(id1));
38 sprintf(buf, "CPU: Xtensa %s (id: %08x:%08x) at %s MHz\n",
39 XCHAL_CORE_ID, id0, id1, strmhz(mhz, gd->cpu_clk));
45 int arch_cpu_init(void)
47 gd->ram_size = CONFIG_SYS_SDRAM_SIZE;