From c65001fcda55758d3be1f8bc0571672263f9ab57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Wed, 19 Jun 2013 10:41:18 +0300 Subject: Fix CBMEM console use with CAR_MIGRATION MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: http://review.coreboot.org/3609 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/lib/cbmem_console.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/lib/cbmem_console.c b/src/lib/cbmem_console.c index de452d781d..1b584028b4 100644 --- a/src/lib/cbmem_console.c +++ b/src/lib/cbmem_console.c @@ -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_) -- cgit v1.2.3