]> git.ipfire.org Git - thirdparty/u-boot.git/blame - arch/arm/cpu/armv7/s5p-common/cpu_info.c
SPDX: Convert all of our single license tags to Linux Kernel style
[thirdparty/u-boot.git] / arch / arm / cpu / armv7 / s5p-common / cpu_info.c
CommitLineData
83d290c5 1// SPDX-License-Identifier: GPL-2.0+
399e5ae0
MK
2/*
3 * Copyright (C) 2009 Samsung Electronics
4 * Minkyu Kang <mk7.kang@samsung.com>
399e5ae0
MK
5 */
6#include <common.h>
fdbb740d 7#include <fdtdec.h>
399e5ae0
MK
8#include <asm/io.h>
9#include <asm/arch/clk.h>
10
fdbb740d
PM
11DECLARE_GLOBAL_DATA_PTR;
12
399e5ae0 13/* Default is s5pc100 */
37168dab 14unsigned int s5p_cpu_id = 0xC100;
5d845f27
MK
15/* Default is EVT1 */
16unsigned int s5p_cpu_rev = 1;
399e5ae0
MK
17
18#ifdef CONFIG_ARCH_CPU_INIT
19int arch_cpu_init(void)
20{
37168dab 21 s5p_set_cpu_id();
399e5ae0 22
399e5ae0
MK
23 return 0;
24}
25#endif
26
27u32 get_device_type(void)
28{
37168dab 29 return s5p_cpu_id;
399e5ae0
MK
30}
31
32#ifdef CONFIG_DISPLAY_CPUINFO
33int print_cpuinfo(void)
34{
fdbb740d
PM
35 const char *cpu_model;
36 int len;
37
38 /* For SoC with no real CPU ID in naming convention. */
39 cpu_model = fdt_getprop(gd->fdt_blob, 0, "cpu-model", &len);
40 if (cpu_model)
41 printf("CPU: %.*s @ ", len, cpu_model);
42 else
43 printf("CPU: %s%X @ ", s5p_get_cpu_name(), s5p_cpu_id);
44
71db6341 45 print_freq(get_arm_clk(), "\n");
399e5ae0
MK
46
47 return 0;
48}
49#endif