console: Simplify vtxprintf

We do not need ROMCC support here and using wrappers for
console_tx_byte we can simplify this code.

Change-Id: I7f3b5acdfd0bde1d832b16418339dd5e232627e7
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/5334
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
Kyösti Mälkki
2014-02-04 14:28:17 +02:00
committed by Patrick Georgi
parent 657e0be464
commit b04e0fff7d
5 changed files with 20 additions and 42 deletions

View File

@ -5,6 +5,7 @@
*
*/
#include <stddef.h>
#include <smp/node.h>
#include <smp/spinlock.h>
#include <console/vtxprintf.h>
@ -20,6 +21,11 @@ void do_putchar(unsigned char byte)
console_tx_byte(byte);
}
void wrap_putchar(unsigned char byte, void *data)
{
do_putchar(byte);
}
int do_printk(int msg_level, const char *fmt, ...)
{
va_list args;
@ -37,7 +43,7 @@ int do_printk(int msg_level, const char *fmt, ...)
spin_lock(&console_lock);
va_start(args, fmt);
i = vtxprintf(do_putchar, fmt, args);
i = vtxprintf(wrap_putchar, fmt, args, NULL);
va_end(args);
console_tx_flush();
@ -51,7 +57,7 @@ int do_printk(int msg_level, const char *fmt, ...)
#if CONFIG_CHROMEOS
void do_vtxprintf(const char *fmt, va_list args)
{
vtxprintf(do_putchar, fmt, args);
vtxprintf(wrap_putchar, fmt, args, NULL);
console_tx_flush();
}
#endif