x86: Introduce USE_EARLY_BOARD_INIT option
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 20 Aug 2020 10:02:20 +0000 (13:02 +0300)
committerBin Meng <bmeng.cn@gmail.com>
Tue, 1 Sep 2020 05:38:31 +0000 (13:38 +0800)
Introduce USE_EARLY_BOARD_INIT option and select it by the actual users.

Cc: George McCollister <george.mccollister@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Aiden Park <aiden.park@intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/Kconfig
arch/x86/cpu/start.S
board/google/chromebook_coral/Kconfig
board/google/chromebook_link/Kconfig
board/google/chromebook_samus/Kconfig

index a34b108fffa6f0e92047d0dadac878a9ca5fa785..76276c6027455c0bf7fbdf69a97e1144f4e16963 100644 (file)
@@ -203,6 +203,9 @@ config SPL_X86_32BIT_INIT
        help
          This is enabled when 32-bit init is in SPL
 
+config USE_EARLY_BOARD_INIT
+       bool
+
 config RESET_SEG_START
        hex
        depends on X86_RESET_VECTOR
index 4ad515ce0856f14eb355a8f6f5db61c6b5d57dac..3b6ed37bc07e95b07f4fd0791460b94d21275e50 100644 (file)
@@ -88,6 +88,7 @@ _start:
        /* Clear the interrupt vectors */
        lidt    blank_idt_ptr
 
+#ifdef CONFIG_USE_EARLY_BOARD_INIT
        /*
         * Critical early platform init - generally not used, we prefer init
         * to happen later when we have a console, in case something goes
@@ -96,6 +97,8 @@ _start:
        jmp     early_board_init
 .globl early_board_init_ret
 early_board_init_ret:
+#endif
+
        post_code(POST_START)
 
        /* Initialise Cache-As-RAM */
index 940bee89b0b63719e683f66234859dd4a6494fd9..27671958e146057e6ccfa85b1512dfe2d0b148d2 100644 (file)
@@ -18,6 +18,7 @@ config SYS_TEXT_BASE
 config BOARD_SPECIFIC_OPTIONS # dummy
        def_bool y
        select X86_RESET_VECTOR
+       select USE_EARLY_BOARD_INIT
        select INTEL_APOLLOLAKE
        select BOARD_ROMSIZE_KB_16384
 
index 944716d002c9d0043d81cfa85af2ca9ec19b7c10..dd29ddf694be199428c0880d4a30c530cd2323c2 100644 (file)
@@ -19,6 +19,7 @@ config SYS_TEXT_BASE
 config BOARD_SPECIFIC_OPTIONS # dummy
        def_bool y
        select X86_RESET_VECTOR
+       select USE_EARLY_BOARD_INIT
        select NORTHBRIDGE_INTEL_IVYBRIDGE
        select HAVE_INTEL_ME
        select BOARD_ROMSIZE_KB_8192
index 90c23cba1bedcc3d7ae19c17b129578c3a18f1e0..9f66d79988708d3b007786224964c3d55e6db600 100644 (file)
@@ -19,6 +19,7 @@ config SYS_TEXT_BASE
 config BOARD_SPECIFIC_OPTIONS # dummy
        def_bool y
        select X86_RESET_VECTOR
+       select USE_EARLY_BOARD_INIT
        select INTEL_BROADWELL
        select HAVE_INTEL_ME
        select BOARD_ROMSIZE_KB_8192