diff options
author | Simon Glass <sjg@chromium.org> | 2017-03-28 10:27:30 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-04-05 13:55:09 -0400 |
commit | 76d1d02fd280ef7ad63a97c3a80bd765bf5596fa (patch) | |
tree | ea7633ce30c7a60653b4da7cb8d40308c9f5ba6b /arch/x86/cpu/broadwell/cpu.c | |
parent | 8749fa6af3e94630eeb02bc3a45fe9bdcb8d3087 (diff) |
board_f: x86: Use checkcpu() for CPU init
At present we misuse print_cpuinfo() do so CPU init on x86. This is done
because it is the next available call after the console is enabled. But
several arches use checkcpu() instead. Despite the horrible name (which
we can fix), it seems a better choice.
Adjust the various x86 CPU implementations to move their init code into
checkcpu() and use print_cpuinfo() only for printing CPU info.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'arch/x86/cpu/broadwell/cpu.c')
-rw-r--r-- | arch/x86/cpu/broadwell/cpu.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/x86/cpu/broadwell/cpu.c b/arch/x86/cpu/broadwell/cpu.c index 1b71d566c9..294dfa6643 100644 --- a/arch/x86/cpu/broadwell/cpu.c +++ b/arch/x86/cpu/broadwell/cpu.c @@ -131,10 +131,8 @@ int arch_cpu_init(void) return x86_cpu_init_f(); } -int print_cpuinfo(void) +int checkcpu(void) { - char processor_name[CPU_MAX_NAME_LEN]; - const char *name; int ret; set_max_freq(); @@ -144,6 +142,14 @@ int print_cpuinfo(void) return ret; gd->arch.pei_boot_mode = PEI_BOOT_NONE; + return 0; +} + +int print_cpuinfo(void) +{ + char processor_name[CPU_MAX_NAME_LEN]; + const char *name; + /* Print processor name */ name = cpu_get_name(processor_name); printf("CPU: %s\n", name); |