[coreboot-gerrit] New patch to review for coreboot: 053d748 ROMCC boards: Fix builds with CBMEM console, timestamps or usbdebug

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Wed Sep 11 15:46:16 CEST 2013


Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3919

-gerrit

commit 053d748051f17a77d455d309b02ef724245f08b6
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date:   Tue Sep 10 13:50:32 2013 +0300

    ROMCC boards: Fix builds with CBMEM console, timestamps or usbdebug
    
    Change-Id: I9de5ad41ea733655a3fbdc734646f818e39cc471
    Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
 src/arch/x86/lib/romcc_console.c    | 3 ---
 src/console/console.c               | 2 +-
 src/include/console/cbmem_console.h | 6 ++++++
 src/lib/Makefile.inc                | 6 ++++--
 4 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/src/arch/x86/lib/romcc_console.c b/src/arch/x86/lib/romcc_console.c
index 0e1f4e6..13ee1f0 100644
--- a/src/arch/x86/lib/romcc_console.c
+++ b/src/arch/x86/lib/romcc_console.c
@@ -46,9 +46,6 @@ static void __console_tx_byte(unsigned char byte)
 #if CONFIG_CONSOLE_NE2K
 	ne2k_append_data_byte(byte, CONFIG_CONSOLE_NE2K_IO_PORT);
 #endif
-#if CONFIG_CONSOLE_CBMEM
-	cbmemc_tx_byte(byte);
-#endif
 }
 
 static void __console_tx_nibble(unsigned nibble)
diff --git a/src/console/console.c b/src/console/console.c
index b2b06b3..06a4604 100644
--- a/src/console/console.c
+++ b/src/console/console.c
@@ -119,7 +119,7 @@ void console_init(void)
 #if CONFIG_SPKMODEM
 	spkmodem_init();
 #endif
-#if CONFIG_USBDEBUG
+#if CONFIG_USBDEBUG && !defined(__BOOT_BLOCK__)
 	usbdebug_init();
 #endif
 
diff --git a/src/include/console/cbmem_console.h b/src/include/console/cbmem_console.h
index 37ea4d8..9e2f14e 100644
--- a/src/include/console/cbmem_console.h
+++ b/src/include/console/cbmem_console.h
@@ -19,8 +19,14 @@
 #ifndef _CONSOLE_CBMEM_CONSOLE_H_
 #define _CONSOLE_CBMEM_CONSOLE_H_
 
+#if CONFIG_CACHE_AS_RAM || !defined(__PRE_RAM__)
 void cbmemc_init(void);
 void cbmemc_reinit(void);
 void cbmemc_tx_byte(unsigned char data);
+#else
+#define cbmemc_init()
+#define cbmemc_reinit()
+#define cbmemc_tx_byte()
+#endif
 
 #endif
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc
index f3e7dc5..44b5ebd 100644
--- a/src/lib/Makefile.inc
+++ b/src/lib/Makefile.inc
@@ -47,12 +47,14 @@ romstage-$(CONFIG_COMPRESS_RAMSTAGE) += lzma.c
 romstage-$(CONFIG_CACHE_AS_RAM) += ramtest.c
 romstage-$(CONFIG_CONSOLE_SERIAL8250) += uart8250.c
 romstage-$(CONFIG_CONSOLE_SERIAL8250MEM) += uart8250mem.c
-romstage-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c
 romstage-$(CONFIG_CONSOLE_NE2K) += ne2k.c
-romstage-$(CONFIG_USBDEBUG) += usbdebug.c
 romstage-$(CONFIG_SPKMODEM) += spkmodem.c
 
+ifeq ($(CONFIG_CACHE_AS_RAM),y)
 romstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c
+romstage-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c
+romstage-$(CONFIG_USBDEBUG) += usbdebug.c
+endif
 
 ifneq ($(CONFIG_DYNAMIC_CBMEM),y)
 romstage-$(CONFIG_EARLY_CBMEM_INIT) += cbmem.c



More information about the coreboot-gerrit mailing list