mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-17 22:49:02 +00:00
x86: broadwell: Avoid initing the CPU twice
When TPL has already set up the CPU, don't do it again. This existing code actually has this backwards, so fix it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
623b3e8f97
commit
3ca9b86e23
1 changed files with 5 additions and 5 deletions
|
@ -11,6 +11,7 @@
|
||||||
#include <event.h>
|
#include <event.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <log.h>
|
#include <log.h>
|
||||||
|
#include <spl.h>
|
||||||
#include <asm/cpu.h>
|
#include <asm/cpu.h>
|
||||||
#include <asm/cpu_x86.h>
|
#include <asm/cpu_x86.h>
|
||||||
#include <asm/cpu_common.h>
|
#include <asm/cpu_common.h>
|
||||||
|
@ -67,12 +68,11 @@ int arch_cpu_init(void)
|
||||||
{
|
{
|
||||||
post_code(POST_CPU_INIT);
|
post_code(POST_CPU_INIT);
|
||||||
|
|
||||||
#ifdef CONFIG_TPL
|
|
||||||
/* Do a mini-init if TPL has already done the full init */
|
/* Do a mini-init if TPL has already done the full init */
|
||||||
return x86_cpu_reinit_f();
|
if (IS_ENABLED(CONFIG_TPL) && spl_phase() != PHASE_TPL)
|
||||||
#else
|
return x86_cpu_reinit_f();
|
||||||
return x86_cpu_init_f();
|
else
|
||||||
#endif
|
return x86_cpu_init_f();
|
||||||
}
|
}
|
||||||
|
|
||||||
int checkcpu(void)
|
int checkcpu(void)
|
||||||
|
|
Loading…
Add table
Reference in a new issue