blob: a8d91e769fc1ddfdbf1e881bfca78d07709e6891 [file] [log] [blame]
Minkyu Kang87649982009-10-01 17:20:01 +09001/*
2 * Copyright (C) 2009 Samsung Electronics
3 * Minkyu Kang <mk7.kang@samsung.com>
4 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Minkyu Kang87649982009-10-01 17:20:01 +09006 */
7#include <common.h>
8#include <asm/io.h>
9#include <asm/arch/clk.h>
10
11/* Default is s5pc100 */
Minkyu Kang2917c0a2010-08-19 20:41:50 +090012unsigned int s5p_cpu_id = 0xC100;
Minkyu Kang13398722011-05-16 19:45:54 +090013/* Default is EVT1 */
14unsigned int s5p_cpu_rev = 1;
Minkyu Kang87649982009-10-01 17:20:01 +090015
16#ifdef CONFIG_ARCH_CPU_INIT
17int arch_cpu_init(void)
18{
Minkyu Kang2917c0a2010-08-19 20:41:50 +090019 s5p_set_cpu_id();
Minkyu Kang87649982009-10-01 17:20:01 +090020
Minkyu Kang87649982009-10-01 17:20:01 +090021 return 0;
22}
23#endif
24
25u32 get_device_type(void)
26{
Minkyu Kang2917c0a2010-08-19 20:41:50 +090027 return s5p_cpu_id;
Minkyu Kang87649982009-10-01 17:20:01 +090028}
29
30#ifdef CONFIG_DISPLAY_CPUINFO
31int print_cpuinfo(void)
32{
33 char buf[32];
34
Minkyu Kangf92e88e2012-04-26 15:48:32 +090035 printf("CPU:\t%s%X@%sMHz\n",
36 s5p_get_cpu_name(), s5p_cpu_id,
37 strmhz(buf, get_arm_clk()));
Minkyu Kang87649982009-10-01 17:20:01 +090038
39 return 0;
40}
41#endif