mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-28 10:01:32 +00:00
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>
This commit is contained in:
parent
c698b998bb
commit
4e81920ba8
2 changed files with 11 additions and 4 deletions
|
@ -17,6 +17,14 @@ config CONSOLE_RECORD
|
||||||
To enable console recording, call console_record_reset_enable()
|
To enable console recording, call console_record_reset_enable()
|
||||||
from your code.
|
from your code.
|
||||||
|
|
||||||
|
config CONSOLE_RECORD_INIT_F
|
||||||
|
bool "Enable console recording during pre-relocation init"
|
||||||
|
depends on CONSOLE_RECORD && SYS_MALLOC_F
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
This option enables console recording during pre-relocation init.
|
||||||
|
CONFIG_SYS_MALLOC_F must be enabled to use this feature.
|
||||||
|
|
||||||
config CONSOLE_RECORD_OUT_SIZE
|
config CONSOLE_RECORD_OUT_SIZE
|
||||||
hex "Output buffer size"
|
hex "Output buffer size"
|
||||||
depends on CONSOLE_RECORD
|
depends on CONSOLE_RECORD
|
||||||
|
|
|
@ -767,11 +767,10 @@ static int initf_bootstage(void)
|
||||||
|
|
||||||
static int initf_console_record(void)
|
static int initf_console_record(void)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_CONSOLE_RECORD) && CONFIG_VAL(SYS_MALLOC_F_LEN)
|
if (IS_ENABLED(CONFIG_CONSOLE_RECORD_INIT_F))
|
||||||
return console_record_init();
|
return console_record_init();
|
||||||
#else
|
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int initf_dm(void)
|
static int initf_dm(void)
|
||||||
|
|
Loading…
Add table
Reference in a new issue