From 657e0be46495bb54ddf5a0fbad786fe352c2847f Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Tue, 4 Feb 2014 19:03:57 +0200 Subject: console: Move newline translation outside console_tx_byte MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This gives us completely transparent low-level function to transmit data. Change-Id: I706791ff43d80a36a7252a4da0e6f3af92520db7 Signed-off-by: Kyösti Mälkki Reviewed-on: http://review.coreboot.org/5336 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/include/console/console.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/include') diff --git a/src/include/console/console.h b/src/include/console/console.h index e7b4253c32..c184f83e20 100644 --- a/src/include/console/console.h +++ b/src/include/console/console.h @@ -62,25 +62,26 @@ void post_log_clear(void); /* this function is weak and can be overridden by a mainboard function. */ void mainboard_post(u8 value); void __attribute__ ((noreturn)) die(const char *msg); -int do_printk(int msg_level, const char *fmt, ...) __attribute__((format(printf, 2, 3))); #if defined(__BOOT_BLOCK__) && !CONFIG_BOOTBLOCK_CONSOLE || \ defined(__SMM__) && !CONFIG_DEBUG_SMI || \ (defined(__PRE_RAM__) && !defined(__BOOT_BLOCK__)) && !CONFIG_EARLY_CONSOLE -static inline void printk(int LEVEL, const char *fmt, ...); -static inline void printk(int LEVEL, const char *fmt, ...) { - /* Do nothing. */ -} +/* Do nothing. */ +static inline void printk(int LEVEL, const char *fmt, ...) {} +static inline void do_putchar(unsigned char byte) {} -#else /* defined(__PRE_RAM__) && !CONFIG_EARLY_CONSOLE */ +#else + +int do_printk(int msg_level, const char *fmt, ...) __attribute__((format(printf, 2, 3))); +void do_putchar(unsigned char byte); #define printk(LEVEL, fmt, args...) \ do { \ do_printk(LEVEL, fmt, ##args); \ } while(0) -#endif /* defined(__PRE_RAM__) && !CONFIG_EARLY_CONSOLE */ +#endif #if CONFIG_CHROMEOS /* FIXME: Collision of varargs with AMD headers without guard. */ -- cgit v1.2.3