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: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
config INTEL_BROADWELL
|
||||
bool
|
||||
select CACHE_MRC_BIN
|
||||
select ARCH_EARLY_INIT_R
|
||||
imply HAVE_INTEL_ME
|
||||
|
||||
if INTEL_BROADWELL
|
||||
|
||||
@@ -56,7 +56,17 @@ struct rmodule_header {
|
||||
uint32_t padding[4];
|
||||
} __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 = &_pei_data;
|
||||
@@ -111,3 +121,8 @@ int cpu_run_reference_code(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int arch_early_init_r(void)
|
||||
{
|
||||
return cpu_run_reference_code();
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
config QEMU
|
||||
bool
|
||||
select ARCH_EARLY_INIT_R
|
||||
|
||||
if QEMU
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
config INTEL_QUARK
|
||||
bool
|
||||
select HAVE_RMU
|
||||
select ARCH_EARLY_INIT_R
|
||||
select ARCH_MISC_INIT
|
||||
|
||||
if INTEL_QUARK
|
||||
|
||||
@@ -8,6 +8,7 @@ config INTEL_QUEENSBAY
|
||||
bool
|
||||
select HAVE_FSP
|
||||
select HAVE_CMC
|
||||
select ARCH_EARLY_INIT_R
|
||||
|
||||
if INTEL_QUEENSBAY
|
||||
|
||||
|
||||
@@ -288,16 +288,4 @@ u32 cpu_get_family_model(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
|
||||
|
||||
Reference in New Issue
Block a user