diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2017-07-30 06:23:13 -0700 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2017-08-01 20:17:02 +0800 |
commit | 5d89b37f71ff1833bdd34eeba6dbac6bec1c9fb2 (patch) | |
tree | 951d9c0bac06285a605b3cc01efc7c126dff2fd7 /arch/x86/cpu/broadwell/refcode.c | |
parent | 3612b1efebff5230a86e3101d196a1952adc6ac4 (diff) | |
download | u-boot-5d89b37f71ff1833bdd34eeba6dbac6bec1c9fb2.tar.gz |
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>
Diffstat (limited to 'arch/x86/cpu/broadwell/refcode.c')
-rw-r--r-- | arch/x86/cpu/broadwell/refcode.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/arch/x86/cpu/broadwell/refcode.c b/arch/x86/cpu/broadwell/refcode.c index 436c6c49c3..4fa4de3525 100644 --- a/arch/x86/cpu/broadwell/refcode.c +++ b/arch/x86/cpu/broadwell/refcode.c @@ -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(); +} |