]> Git Repo - J-u-boot.git/blame - arch/arm/cpu/armv7/s5p-common/cpu_info.c
common: Drop init.h from common header
[J-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 <[email protected]>
399e5ae0
MK
5 */
6#include <common.h>
fdbb740d 7#include <fdtdec.h>
691d719d 8#include <init.h>
399e5ae0
MK
9#include <asm/io.h>
10#include <asm/arch/clk.h>
11
fdbb740d
PM
12DECLARE_GLOBAL_DATA_PTR;
13
399e5ae0 14/* Default is s5pc100 */
37168dab 15unsigned int s5p_cpu_id = 0xC100;
5d845f27
MK
16/* Default is EVT1 */
17unsigned int s5p_cpu_rev = 1;
399e5ae0
MK
18
19#ifdef CONFIG_ARCH_CPU_INIT
20int arch_cpu_init(void)
21{
37168dab 22 s5p_set_cpu_id();
399e5ae0 23
399e5ae0
MK
24 return 0;
25}
26#endif
27
28u32 get_device_type(void)
29{
37168dab 30 return s5p_cpu_id;
399e5ae0
MK
31}
32
33#ifdef CONFIG_DISPLAY_CPUINFO
34int print_cpuinfo(void)
35{
fdbb740d
PM
36 const char *cpu_model;
37 int len;
38
39 /* For SoC with no real CPU ID in naming convention. */
40 cpu_model = fdt_getprop(gd->fdt_blob, 0, "cpu-model", &len);
41 if (cpu_model)
42 printf("CPU: %.*s @ ", len, cpu_model);
43 else
44 printf("CPU: %s%X @ ", s5p_get_cpu_name(), s5p_cpu_id);
45
71db6341 46 print_freq(get_arm_clk(), "\n");
399e5ae0
MK
47
48 return 0;
49}
50#endif
This page took 0.437537 seconds and 4 git commands to generate.