2018-05-06 21:58:06 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2009-10-01 08:20:01 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2009 Samsung Electronics
|
|
|
|
* Minkyu Kang <mk7.kang@samsung.com>
|
|
|
|
*/
|
|
|
|
#include <common.h>
|
2022-07-31 18:28:48 +00:00
|
|
|
#include <display_options.h>
|
2015-10-27 12:07:55 +00:00
|
|
|
#include <fdtdec.h>
|
2020-05-10 17:40:02 +00:00
|
|
|
#include <init.h>
|
2020-10-31 03:38:53 +00:00
|
|
|
#include <asm/global_data.h>
|
2009-10-01 08:20:01 +00:00
|
|
|
#include <asm/io.h>
|
|
|
|
#include <asm/arch/clk.h>
|
|
|
|
|
2015-10-27 12:07:55 +00:00
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
|
2009-10-01 08:20:01 +00:00
|
|
|
/* Default is s5pc100 */
|
2010-08-19 11:41:50 +00:00
|
|
|
unsigned int s5p_cpu_id = 0xC100;
|
2011-05-16 10:45:54 +00:00
|
|
|
/* Default is EVT1 */
|
|
|
|
unsigned int s5p_cpu_rev = 1;
|
2009-10-01 08:20:01 +00:00
|
|
|
|
|
|
|
#ifdef CONFIG_ARCH_CPU_INIT
|
|
|
|
int arch_cpu_init(void)
|
|
|
|
{
|
2010-08-19 11:41:50 +00:00
|
|
|
s5p_set_cpu_id();
|
2009-10-01 08:20:01 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
u32 get_device_type(void)
|
|
|
|
{
|
2010-08-19 11:41:50 +00:00
|
|
|
return s5p_cpu_id;
|
2009-10-01 08:20:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef CONFIG_DISPLAY_CPUINFO
|
|
|
|
int print_cpuinfo(void)
|
|
|
|
{
|
2015-10-27 12:07:55 +00:00
|
|
|
const char *cpu_model;
|
|
|
|
int len;
|
|
|
|
|
|
|
|
/* For SoC with no real CPU ID in naming convention. */
|
|
|
|
cpu_model = fdt_getprop(gd->fdt_blob, 0, "cpu-model", &len);
|
|
|
|
if (cpu_model)
|
|
|
|
printf("CPU: %.*s @ ", len, cpu_model);
|
|
|
|
else
|
|
|
|
printf("CPU: %s%X @ ", s5p_get_cpu_name(), s5p_cpu_id);
|
|
|
|
|
2015-07-03 00:16:15 +00:00
|
|
|
print_freq(get_arm_clk(), "\n");
|
2009-10-01 08:20:01 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
#endif
|