summaryrefslogtreecommitdiff
path: root/src/include/console
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2014-02-04 19:03:57 +0200
committerPatrick Georgi <patrick@georgi-clan.de>2014-04-09 13:21:25 +0200
commit657e0be46495bb54ddf5a0fbad786fe352c2847f (patch)
tree3e4c5c4268d78078be1949d828800ae6c7196600 /src/include/console
parentb3356bbff42148094ada671d3a0a803f195542e6 (diff)
downloadcoreboot-657e0be46495bb54ddf5a0fbad786fe352c2847f.tar.xz
console: Move newline translation outside console_tx_byte
This gives us completely transparent low-level function to transmit data. Change-Id: I706791ff43d80a36a7252a4da0e6f3af92520db7 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/5336 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'src/include/console')
-rw-r--r--src/include/console/console.h15
1 files changed, 8 insertions, 7 deletions
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. */