summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/cbmem.c2
-rw-r--r--src/lib/cbmem_common.c5
-rw-r--r--src/lib/dynamic_cbmem.c2
3 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/cbmem.c b/src/lib/cbmem.c
index 5f834b74f4..ba6560c499 100644
--- a/src/lib/cbmem.c
+++ b/src/lib/cbmem.c
@@ -23,7 +23,6 @@
#include <bootstate.h>
#include <cbmem.h>
#include <console/console.h>
-#include <console/cbmem_console.h>
#include <arch/early_variables.h>
#if CONFIG_HAVE_ACPI_RESUME && !defined(__PRE_RAM__)
#include <arch/acpi.h>
@@ -256,7 +255,6 @@ static void init_cbmem_post_device(void *unused)
#else
cbmem_recovery(0);
#endif
- cbmemc_reinit();
}
BOOT_STATE_INIT_ENTRIES(cbmem_bscb) = {
diff --git a/src/lib/cbmem_common.c b/src/lib/cbmem_common.c
index 438fd7f8b9..1630628969 100644
--- a/src/lib/cbmem_common.c
+++ b/src/lib/cbmem_common.c
@@ -20,6 +20,9 @@
#include <cbmem.h>
#include <stdlib.h>
+/* FIXME: Remove after CBMEM_INIT_HOOKS. */
+#include <console/cbmem_console.h>
+
#ifndef __PRE_RAM__
static const struct cbmem_id_to_name cbmem_ids[] = { CBMEM_ID_TO_NAME_TABLE };
@@ -52,6 +55,8 @@ void cbmem_print_entry(int n, u32 id, u64 base, u64 size)
#if !IS_ENABLED(CONFIG_ARCH_X86)
void cbmem_run_init_hooks(void)
{
+ /* Relocate CBMEM console. */
+ cbmemc_reinit();
}
void __attribute__((weak)) cbmem_fail_resume(void)
diff --git a/src/lib/dynamic_cbmem.c b/src/lib/dynamic_cbmem.c
index ce4e625f55..a5f2fc2db6 100644
--- a/src/lib/dynamic_cbmem.c
+++ b/src/lib/dynamic_cbmem.c
@@ -21,7 +21,6 @@
#include <bootmem.h>
#include <console/console.h>
#include <cbmem.h>
-#include <console/cbmem_console.h>
#include <string.h>
#include <stdlib.h>
#include <arch/early_variables.h>
@@ -426,7 +425,6 @@ void *cbmem_entry_start(const struct cbmem_entry *entry)
static void init_cbmem_pre_device(void *unused)
{
cbmem_initialize();
- cbmemc_reinit();
}
BOOT_STATE_INIT_ENTRIES(cbmem_bscb) = {