summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/cbmem_console.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lib/cbmem_console.c b/src/lib/cbmem_console.c
index 30bf439511..e9607f3a35 100644
--- a/src/lib/cbmem_console.c
+++ b/src/lib/cbmem_console.c
@@ -225,11 +225,8 @@ void cbmemc_reinit(void)
/* Need to reset the newly added cbmem console in ramstage
* when there was no console in preram environment. */
- if (ENV_RAMSTAGE) {
- cbm_cons_p = cbmem_find(CBMEM_ID_CONSOLE);
- if (cbm_cons_p == NULL)
- flags |= CBMEMC_RESET;
- }
+ if (ENV_RAMSTAGE && IS_ENABLED(CONFIG_LATE_CBMEM_INIT))
+ flags |= CBMEMC_RESET;
/* If CBMEM entry already existed, old contents is not altered. */
cbm_cons_p = cbmem_add(CBMEM_ID_CONSOLE, size);