提交 5d89b37f 编写于 作者: B Bin Meng

x86: kconfig: Select ARCH_EARLY_INIT_R in the platform Kconfig

This is architecture-dependent early initialization hence should
be put in the platform Kconfig.
Signed-off-by: NBin Meng <bmeng.cn@gmail.com>
Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: NSimon Glass <sjg@chromium.org>
上级 3612b1ef
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
config INTEL_BROADWELL config INTEL_BROADWELL
bool bool
select CACHE_MRC_BIN select CACHE_MRC_BIN
select ARCH_EARLY_INIT_R
imply HAVE_INTEL_ME imply HAVE_INTEL_ME
if INTEL_BROADWELL if INTEL_BROADWELL
......
...@@ -56,7 +56,17 @@ struct rmodule_header { ...@@ -56,7 +56,17 @@ struct rmodule_header {
uint32_t padding[4]; uint32_t padding[4];
} __packed; } __packed;
int cpu_run_reference_code(void) /**
* cpu_run_reference_code() - Run the platform reference code
*
* Some platforms require a binary blob to be executed once SDRAM is
* available. This is used to set up various platform features, such as the
* platform controller hub (PCH). This function should be implemented by the
* CPU-specific code.
*
* @return 0 on success, -ve on failure
*/
static int cpu_run_reference_code(void)
{ {
struct pei_data _pei_data __aligned(8); struct pei_data _pei_data __aligned(8);
struct pei_data *pei_data = &_pei_data; struct pei_data *pei_data = &_pei_data;
...@@ -111,3 +121,8 @@ int cpu_run_reference_code(void) ...@@ -111,3 +121,8 @@ int cpu_run_reference_code(void)
return 0; return 0;
} }
int arch_early_init_r(void)
{
return cpu_run_reference_code();
}
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
config QEMU config QEMU
bool bool
select ARCH_EARLY_INIT_R
if QEMU if QEMU
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
config INTEL_QUARK config INTEL_QUARK
bool bool
select HAVE_RMU select HAVE_RMU
select ARCH_EARLY_INIT_R
select ARCH_MISC_INIT select ARCH_MISC_INIT
if INTEL_QUARK if INTEL_QUARK
......
...@@ -8,6 +8,7 @@ config INTEL_QUEENSBAY ...@@ -8,6 +8,7 @@ config INTEL_QUEENSBAY
bool bool
select HAVE_FSP select HAVE_FSP
select HAVE_CMC select HAVE_CMC
select ARCH_EARLY_INIT_R
if INTEL_QUEENSBAY if INTEL_QUEENSBAY
......
...@@ -288,16 +288,4 @@ u32 cpu_get_family_model(void); ...@@ -288,16 +288,4 @@ u32 cpu_get_family_model(void);
*/ */
u32 cpu_get_stepping(void); u32 cpu_get_stepping(void);
/**
* cpu_run_reference_code() - Run the platform reference code
*
* Some platforms require a binary blob to be executed once SDRAM is
* available. This is used to set up various platform features, such as the
* platform controller hub (PCH). This function should be implemented by the
* CPU-specific code.
*
* @return 0 on success, -ve on failure
*/
int cpu_run_reference_code(void);
#endif #endif
...@@ -17,8 +17,3 @@ int board_early_init_f(void) ...@@ -17,8 +17,3 @@ int board_early_init_f(void)
return 0; return 0;
} }
int arch_early_init_r(void)
{
return 0;
}
...@@ -28,11 +28,6 @@ int board_early_init_f(void) ...@@ -28,11 +28,6 @@ int board_early_init_f(void)
return 0; return 0;
} }
int arch_early_init_r(void)
{
return 0;
}
int board_late_init(void) int board_late_init(void)
{ {
struct udevice *dev; struct udevice *dev;
......
...@@ -12,4 +12,4 @@ ...@@ -12,4 +12,4 @@
# SPDX-License-Identifier: GPL-2.0+ # SPDX-License-Identifier: GPL-2.0+
# #
obj-y += coreboot_start.o coreboot.o obj-y += coreboot_start.o
/*
* Copyright (C) 2013 Google, Inc
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <cros_ec.h>
#include <asm/gpio.h>
int arch_early_init_r(void)
{
return 0;
}
...@@ -5,9 +5,3 @@ ...@@ -5,9 +5,3 @@
*/ */
#include <common.h> #include <common.h>
#include <asm/gpio.h>
int arch_early_init_r(void)
{
return 0;
}
...@@ -5,14 +5,3 @@ ...@@ -5,14 +5,3 @@
*/ */
#include <common.h> #include <common.h>
#include <cros_ec.h>
#include <dm.h>
#include <asm/gpio.h>
#include <asm/io.h>
#include <asm/pci.h>
#include <asm/arch/pch.h>
int arch_early_init_r(void)
{
return 0;
}
...@@ -5,9 +5,3 @@ ...@@ -5,9 +5,3 @@
*/ */
#include <common.h> #include <common.h>
#include <asm/cpu.h>
int arch_early_init_r(void)
{
return cpu_run_reference_code();
}
...@@ -5,9 +5,3 @@ ...@@ -5,9 +5,3 @@
*/ */
#include <common.h> #include <common.h>
#include <asm/arch/pch.h>
int arch_early_init_r(void)
{
return 0;
}
...@@ -12,11 +12,6 @@ ...@@ -12,11 +12,6 @@
#define GPIO_BANKE_NAME "gpioe" #define GPIO_BANKE_NAME "gpioe"
int arch_early_init_r(void)
{
return 0;
}
int misc_init_r(void) int misc_init_r(void)
{ {
struct udevice *dev; struct udevice *dev;
......
...@@ -871,7 +871,6 @@ menu "Start-up hooks" ...@@ -871,7 +871,6 @@ menu "Start-up hooks"
config ARCH_EARLY_INIT_R config ARCH_EARLY_INIT_R
bool "Call arch-specific init soon after relocation" bool "Call arch-specific init soon after relocation"
default y if X86
help help
With this option U-Boot will call arch_early_init_r() soon after With this option U-Boot will call arch_early_init_r() soon after
relocation. Driver model is running by this point, and the cache relocation. Driver model is running by this point, and the cache
......
...@@ -15,7 +15,6 @@ CONFIG_FIT=y ...@@ -15,7 +15,6 @@ CONFIG_FIT=y
CONFIG_BOOTSTAGE=y CONFIG_BOOTSTAGE=y
CONFIG_BOOTSTAGE_REPORT=y CONFIG_BOOTSTAGE_REPORT=y
CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_SYS_CONSOLE_INFO_QUIET=y
# CONFIG_ARCH_EARLY_INIT_R is not set
CONFIG_HUSH_PARSER=y CONFIG_HUSH_PARSER=y
CONFIG_CMD_CPU=y CONFIG_CMD_CPU=y
# CONFIG_CMD_IMLS is not set # CONFIG_CMD_IMLS is not set
......
...@@ -5,7 +5,6 @@ CONFIG_TARGET_COUGARCANYON2=y ...@@ -5,7 +5,6 @@ CONFIG_TARGET_COUGARCANYON2=y
CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_CONSOLE_MUX=y CONFIG_CONSOLE_MUX=y
CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_SYS_CONSOLE_INFO_QUIET=y
# CONFIG_ARCH_EARLY_INIT_R is not set
CONFIG_HUSH_PARSER=y CONFIG_HUSH_PARSER=y
# CONFIG_CMD_IMLS is not set # CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set # CONFIG_CMD_FLASH is not set
......
...@@ -15,7 +15,6 @@ CONFIG_FIT_SIGNATURE=y ...@@ -15,7 +15,6 @@ CONFIG_FIT_SIGNATURE=y
CONFIG_BOOTSTAGE=y CONFIG_BOOTSTAGE=y
CONFIG_BOOTSTAGE_REPORT=y CONFIG_BOOTSTAGE_REPORT=y
CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_SYS_CONSOLE_INFO_QUIET=y
# CONFIG_ARCH_EARLY_INIT_R is not set
CONFIG_HUSH_PARSER=y CONFIG_HUSH_PARSER=y
CONFIG_CMD_CPU=y CONFIG_CMD_CPU=y
# CONFIG_CMD_IMLS is not set # CONFIG_CMD_IMLS is not set
......
...@@ -3,7 +3,6 @@ CONFIG_VENDOR_INTEL=y ...@@ -3,7 +3,6 @@ CONFIG_VENDOR_INTEL=y
CONFIG_DEFAULT_DEVICE_TREE="edison" CONFIG_DEFAULT_DEVICE_TREE="edison"
CONFIG_TARGET_EDISON=y CONFIG_TARGET_EDISON=y
CONFIG_SMP=y CONFIG_SMP=y
# CONFIG_ARCH_EARLY_INIT_R is not set
CONFIG_HUSH_PARSER=y CONFIG_HUSH_PARSER=y
CONFIG_CMD_CPU=y CONFIG_CMD_CPU=y
# CONFIG_CMD_IMLS is not set # CONFIG_CMD_IMLS is not set
......
...@@ -7,7 +7,6 @@ CONFIG_FIT=y ...@@ -7,7 +7,6 @@ CONFIG_FIT=y
CONFIG_ENV_IS_NOWHERE=y CONFIG_ENV_IS_NOWHERE=y
CONFIG_CONSOLE_MUX=y CONFIG_CONSOLE_MUX=y
CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_SYS_CONSOLE_INFO_QUIET=y
# CONFIG_ARCH_EARLY_INIT_R is not set
CONFIG_HUSH_PARSER=y CONFIG_HUSH_PARSER=y
# CONFIG_CMD_BOOTM is not set # CONFIG_CMD_BOOTM is not set
# CONFIG_CMD_IMLS is not set # CONFIG_CMD_IMLS is not set
......
...@@ -15,7 +15,6 @@ CONFIG_FIT_SIGNATURE=y ...@@ -15,7 +15,6 @@ CONFIG_FIT_SIGNATURE=y
CONFIG_BOOTSTAGE=y CONFIG_BOOTSTAGE=y
CONFIG_BOOTSTAGE_REPORT=y CONFIG_BOOTSTAGE_REPORT=y
CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_SYS_CONSOLE_INFO_QUIET=y
# CONFIG_ARCH_EARLY_INIT_R is not set
CONFIG_HUSH_PARSER=y CONFIG_HUSH_PARSER=y
CONFIG_CMD_CPU=y CONFIG_CMD_CPU=y
# CONFIG_CMD_IMLS is not set # CONFIG_CMD_IMLS is not set
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册