Minkyu Kang | 8764998 | 2009-10-01 17:20:01 +0900 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2009 Samsung Electronics |
| 3 | * Minkyu Kang <mk7.kang@samsung.com> |
| 4 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
Minkyu Kang | 8764998 | 2009-10-01 17:20:01 +0900 | [diff] [blame] | 6 | */ |
| 7 | #include <common.h> |
| 8 | #include <asm/io.h> |
| 9 | #include <asm/arch/clk.h> |
| 10 | |
| 11 | /* Default is s5pc100 */ |
Minkyu Kang | 2917c0a | 2010-08-19 20:41:50 +0900 | [diff] [blame] | 12 | unsigned int s5p_cpu_id = 0xC100; |
Minkyu Kang | 1339872 | 2011-05-16 19:45:54 +0900 | [diff] [blame] | 13 | /* Default is EVT1 */ |
| 14 | unsigned int s5p_cpu_rev = 1; |
Minkyu Kang | 8764998 | 2009-10-01 17:20:01 +0900 | [diff] [blame] | 15 | |
| 16 | #ifdef CONFIG_ARCH_CPU_INIT |
| 17 | int arch_cpu_init(void) |
| 18 | { |
Minkyu Kang | 2917c0a | 2010-08-19 20:41:50 +0900 | [diff] [blame] | 19 | s5p_set_cpu_id(); |
Minkyu Kang | 8764998 | 2009-10-01 17:20:01 +0900 | [diff] [blame] | 20 | |
Minkyu Kang | 8764998 | 2009-10-01 17:20:01 +0900 | [diff] [blame] | 21 | return 0; |
| 22 | } |
| 23 | #endif |
| 24 | |
| 25 | u32 get_device_type(void) |
| 26 | { |
Minkyu Kang | 2917c0a | 2010-08-19 20:41:50 +0900 | [diff] [blame] | 27 | return s5p_cpu_id; |
Minkyu Kang | 8764998 | 2009-10-01 17:20:01 +0900 | [diff] [blame] | 28 | } |
| 29 | |
| 30 | #ifdef CONFIG_DISPLAY_CPUINFO |
| 31 | int print_cpuinfo(void) |
| 32 | { |
| 33 | char buf[32]; |
| 34 | |
Minkyu Kang | f92e88e | 2012-04-26 15:48:32 +0900 | [diff] [blame] | 35 | printf("CPU:\t%s%X@%sMHz\n", |
| 36 | s5p_get_cpu_name(), s5p_cpu_id, |
| 37 | strmhz(buf, get_arm_clk())); |
Minkyu Kang | 8764998 | 2009-10-01 17:20:01 +0900 | [diff] [blame] | 38 | |
| 39 | return 0; |
| 40 | } |
| 41 | #endif |