mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
Add a flag indicating when the serial console is ready
For sandbox we have a fallback console which is used very early in U-Boot, before serial drivers are available. Rather than try to guess when to switch to the real console, add a flag so we can be sure. This makes sure that sandbox can always output a panic() message, for example, and avoids silent failure (which is very annoying in sandbox). Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -417,7 +417,7 @@ static inline void print_pre_console_buffer(void) {}
|
||||
void putc(const char c)
|
||||
{
|
||||
#ifdef CONFIG_SANDBOX
|
||||
if (!gd) {
|
||||
if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) {
|
||||
os_putc(c);
|
||||
return;
|
||||
}
|
||||
@@ -447,7 +447,7 @@ void putc(const char c)
|
||||
void puts(const char *s)
|
||||
{
|
||||
#ifdef CONFIG_SANDBOX
|
||||
if (!gd) {
|
||||
if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) {
|
||||
os_puts(s);
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user