console: Unify do_printk()

Change-Id: I6c50e47d9d2d0d1f42beee477e49b2a0054d1786
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/5332
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
Kyösti Mälkki
2014-01-27 15:09:13 +02:00
committed by Patrick Georgi
parent 21333f96c7
commit b2d2596714
5 changed files with 14 additions and 53 deletions

View File

@ -5,14 +5,12 @@
*
*/
#include <smp/node.h>
#include <smp/spinlock.h>
#include <console/vtxprintf.h>
#include <console/console.h>
#include <trace.h>
int console_loglevel = CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
int default_console_loglevel = CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
DECLARE_SPIN_LOCK(console_lock)
int do_printk(int msg_level, const char *fmt, ...)
@ -24,6 +22,11 @@ int do_printk(int msg_level, const char *fmt, ...)
return 0;
}
#if CONFIG_SQUELCH_EARLY_SMP && defined(__PRE_RAM__)
if (!boot_cpu())
return 0;
#endif
DISABLE_TRACE;
spin_lock(&console_lock);