blob: 930d2b6c9d11f2e6d6be03c9db9d7875560d51a6 [file] [log] [blame]
Bin Menga65b25d2015-05-07 21:34:08 +08001/*
2 * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#include <common.h>
Bin Meng5c564222015-06-03 09:20:06 +08008#include <asm/irq.h>
Bin Menga65b25d2015-05-07 21:34:08 +08009#include <asm/post.h>
10#include <asm/processor.h>
11
12int arch_cpu_init(void)
13{
14 int ret;
15
16 post_code(POST_CPU_INIT);
17#ifdef CONFIG_SYS_X86_TSC_TIMER
18 timer_set_base(rdtsc());
19#endif
20
21 ret = x86_cpu_init_f();
22 if (ret)
23 return ret;
24
25 return 0;
26}
27
28int print_cpuinfo(void)
29{
30 post_code(POST_CPU_INFO);
31 return default_print_cpuinfo();
32}
33
34void reset_cpu(ulong addr)
35{
36 /* cold reset */
37 x86_full_reset();
38}
Bin Meng5c564222015-06-03 09:20:06 +080039
40int arch_misc_init(void)
41{
42 pirq_init();
43
44 return 0;
45}