summaryrefslogtreecommitdiff
path: root/arch/x86/lib/fsp1/fsp_common.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-09-25 08:11:27 -0600
committerBin Meng <bmeng.cn@gmail.com>2019-10-08 13:53:48 +0800
commit86875f050bf433fa8078ae9c53d8493f79941f1a (patch)
tree85b8b232b0ad15af5cd819d329d57b2d334c6265 /arch/x86/lib/fsp1/fsp_common.c
parent07f2f58b94b69ea962d1adea0b892825dea908e9 (diff)
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>
Diffstat (limited to 'arch/x86/lib/fsp1/fsp_common.c')
-rw-r--r--arch/x86/lib/fsp1/fsp_common.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/x86/lib/fsp1/fsp_common.c b/arch/x86/lib/fsp1/fsp_common.c
index 591eef7b813..bfd76dccbab 100644
--- a/arch/x86/lib/fsp1/fsp_common.c
+++ b/arch/x86/lib/fsp1/fsp_common.c
@@ -116,11 +116,10 @@ int arch_fsp_init(void)
#endif
if (!gd->arch.hob_list) {
-#ifdef CONFIG_ENABLE_MRC_CACHE
- nvs = fsp_prepare_mrc_cache();
-#else
- nvs = NULL;
-#endif
+ if (IS_ENABLED(CONFIG_ENABLE_MRC_CACHE))
+ nvs = fsp_prepare_mrc_cache();
+ else
+ nvs = NULL;
#ifdef CONFIG_HAVE_ACPI_RESUME
if (prev_sleep_state == ACPI_S3) {