mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 13:11:31 +00:00
log: use console puts to output trace before LOG init
Use the console puts functions to output the traces before the log initialization (when CONFIG_LOG is not activated). This patch allows to display the first U-Boot traces (with macro debug) when CONFIG_DEBUG_UART is activated and not only drop them. For example for traces in board_f.c requested by the macro debug, when LOG_DEBUG is defined and CONFIG_LOG is activated. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
This commit is contained in:
parent
ce9af2a6b5
commit
dd500134a4
1 changed files with 9 additions and 0 deletions
|
@ -246,6 +246,15 @@ int _log(enum log_category_t cat, enum log_level_t level, const char *file,
|
|||
|
||||
if (!(gd->flags & GD_FLG_LOG_READY)) {
|
||||
gd->log_drop_count++;
|
||||
|
||||
/* display dropped traces with console puts and DEBUG_UART */
|
||||
if (rec.level <= CONFIG_LOG_DEFAULT_LEVEL || rec.force_debug) {
|
||||
va_start(args, fmt);
|
||||
vsnprintf(buf, sizeof(buf), fmt, args);
|
||||
puts(buf);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
return -ENOSYS;
|
||||
}
|
||||
va_start(args, fmt);
|
||||
|
|
Loading…
Add table
Reference in a new issue