x86: fsp: Use if() instead of #ifdef
Update a few #ifdefs to if() to improve build coverage. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: recover the codes that got wrongly deleted in dram_init()] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
@@ -116,11 +116,10 @@ int arch_fsp_init(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!gd->arch.hob_list) {
|
if (!gd->arch.hob_list) {
|
||||||
#ifdef CONFIG_ENABLE_MRC_CACHE
|
if (IS_ENABLED(CONFIG_ENABLE_MRC_CACHE))
|
||||||
nvs = fsp_prepare_mrc_cache();
|
nvs = fsp_prepare_mrc_cache();
|
||||||
#else
|
else
|
||||||
nvs = NULL;
|
nvs = NULL;
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_HAVE_ACPI_RESUME
|
#ifdef CONFIG_HAVE_ACPI_RESUME
|
||||||
if (prev_sleep_state == ACPI_S3) {
|
if (prev_sleep_state == ACPI_S3) {
|
||||||
|
@@ -32,10 +32,9 @@ int dram_init(void)
|
|||||||
gd->ram_size = ram_size;
|
gd->ram_size = ram_size;
|
||||||
post_code(POST_DRAM);
|
post_code(POST_DRAM);
|
||||||
|
|
||||||
#ifdef CONFIG_ENABLE_MRC_CACHE
|
if (IS_ENABLED(CONFIG_ENABLE_MRC_CACHE))
|
||||||
gd->arch.mrc_output = fsp_get_nvs_data(gd->arch.hob_list,
|
gd->arch.mrc_output = fsp_get_nvs_data(gd->arch.hob_list,
|
||||||
&gd->arch.mrc_output_len);
|
&gd->arch.mrc_output_len);
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user