summaryrefslogtreecommitdiff
path: root/common/board_f.c
diff options
context:
space:
mode:
authorOvidiu Panait <ovidiu.panait@windriver.com>2020-11-28 10:43:03 +0200
committerTom Rini <trini@konsulko.com>2021-01-15 14:36:11 -0500
commit4e81920ba8f426d381583c9b2e576230a0757db5 (patch)
treede64720a7b22d8f55b12e234de420f97ab858a78 /common/board_f.c
parentc698b998bb6003297f8ce20ba136348446e78278 (diff)
downloadu-boot-4e81920ba8f426d381583c9b2e576230a0757db5.tar.gz
u-boot-4e81920ba8f426d381583c9b2e576230a0757db5.tar.bz2
u-boot-4e81920ba8f426d381583c9b2e576230a0757db5.zip
common: Kconfig: Introduce CONFIG_CONSOLE_RECORD_INIT_F
Currently, the following #ifdef construct is used to check whether to run console_record_init() during pre-relocation init: defined(CONFIG_CONSOLE_RECORD) && CONFIG_VAL(SYS_MALLOC_F_LEN) Introduce CONFIG_CONSOLE_RECORD_INIT_F Kconfig option to get rid of the complex ifdef check. Also, use IS_ENABLED() instead of #ifdef. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/board_f.c')
-rw-r--r--common/board_f.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/common/board_f.c b/common/board_f.c
index 9f441c44f1..e5e69ff0fa 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -767,11 +767,10 @@ static int initf_bootstage(void)
static int initf_console_record(void)
{
-#if defined(CONFIG_CONSOLE_RECORD) && CONFIG_VAL(SYS_MALLOC_F_LEN)
- return console_record_init();
-#else
+ if (IS_ENABLED(CONFIG_CONSOLE_RECORD_INIT_F))
+ return console_record_init();
+
return 0;
-#endif
}
static int initf_dm(void)