Fix CBMEM console use with CAR_MIGRATION

With EARLY_CBMEM_INIT and CAR_MIGRATION selected, cbmemc_reinit()
was called twice during romstage. This effectively deleted output
of romstage in CBMEM console.

Change-Id: I21072a319c0e4a5f695b0573bc017bf7921fc663
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/3609
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@google.com>
This commit is contained in:
Kyösti Mälkki 2013-06-19 10:41:18 +03:00
parent b25a9da6e7
commit c65001fcda
1 changed files with 10 additions and 3 deletions

View File

@ -193,7 +193,7 @@ static void copy_console_buffer(struct cbmem_console *new_cons_p)
new_cons_p->buffer_cursor = cursor;
}
void cbmemc_reinit(void)
static void cbmemc_reinit_(void)
{
struct cbmem_console *cbm_cons_p;
@ -221,5 +221,12 @@ void cbmemc_reinit(void)
current_console_set(cbm_cons_p);
}
/* Call cbmemc_reinit() at CAR migration time. */
CAR_MIGRATE(cbmemc_reinit)
void cbmemc_reinit(void)
{
#if !CONFIG_CAR_MIGRATION || !defined(__PRE_RAM__)
cbmemc_reinit_();
#endif
}
/* Call cbmemc_reinit_() at CAR migration time. */
CAR_MIGRATE(cbmemc_reinit_)