Bin Meng | a65b25d | 2015-05-07 21:34:08 +0800 | [diff] [blame] | 1 | /* |
| 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 Meng | 5c56422 | 2015-06-03 09:20:06 +0800 | [diff] [blame^] | 8 | #include <asm/irq.h> |
Bin Meng | a65b25d | 2015-05-07 21:34:08 +0800 | [diff] [blame] | 9 | #include <asm/post.h> |
| 10 | #include <asm/processor.h> |
| 11 | |
| 12 | int 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 | |
| 28 | int print_cpuinfo(void) |
| 29 | { |
| 30 | post_code(POST_CPU_INFO); |
| 31 | return default_print_cpuinfo(); |
| 32 | } |
| 33 | |
| 34 | void reset_cpu(ulong addr) |
| 35 | { |
| 36 | /* cold reset */ |
| 37 | x86_full_reset(); |
| 38 | } |
Bin Meng | 5c56422 | 2015-06-03 09:20:06 +0800 | [diff] [blame^] | 39 | |
| 40 | int arch_misc_init(void) |
| 41 | { |
| 42 | pirq_init(); |
| 43 | |
| 44 | return 0; |
| 45 | } |