]> Git Repo - J-u-boot.git/blobdiff - arch/x86/cpu/broadwell/cpu.c
xpl: Rename spl_phase() to xpl_phase()
[J-u-boot.git] / arch / x86 / cpu / broadwell / cpu.c
index 7877961451a6deb055304ee4132238b3291b88a0..87463748c4de8a172a8a1e89a9140ea1dca17783 100644 (file)
@@ -5,12 +5,12 @@
  * Based on code from coreboot src/soc/intel/broadwell/cpu.c
  */
 
-#include <common.h>
 #include <dm.h>
 #include <cpu.h>
 #include <event.h>
 #include <init.h>
 #include <log.h>
+#include <spl.h>
 #include <asm/cpu.h>
 #include <asm/cpu_x86.h>
 #include <asm/cpu_common.h>
@@ -25,7 +25,7 @@
 #include <asm/arch/pch.h>
 #include <asm/arch/rcb.h>
 
-static int broadwell_init_cpu(void *ctx, struct event *event)
+static int broadwell_init_cpu(void)
 {
        struct udevice *dev;
        int ret;
@@ -40,7 +40,7 @@ static int broadwell_init_cpu(void *ctx, struct event *event)
 
        return 0;
 }
-EVENT_SPY(EVT_DM_POST_INIT, broadwell_init_cpu);
+EVENT_SPY_SIMPLE(EVT_DM_POST_INIT_F, broadwell_init_cpu);
 
 void set_max_freq(void)
 {
@@ -67,12 +67,11 @@ int arch_cpu_init(void)
 {
        post_code(POST_CPU_INIT);
 
-#ifdef CONFIG_TPL
        /* Do a mini-init if TPL has already done the full init */
-       return x86_cpu_reinit_f();
-#else
-       return x86_cpu_init_f();
-#endif
+       if (IS_ENABLED(CONFIG_TPL) && xpl_phase() != PHASE_TPL)
+               return x86_cpu_reinit_f();
+       else
+               return x86_cpu_init_f();
 }
 
 int checkcpu(void)
This page took 0.025817 seconds and 4 git commands to generate.