common: console: support disable console in & out
Set CONFIG_DISABLE_CONSOLE priority higher than CONFIG_DEBUG_UART, otherwise there maybe some early message is printed by CONFIG_DEBUG_UART. Change-Id: I235a49646b154e10e724e3d63e0ceecdd862c636 Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This commit is contained in:
parent
ab4c011acf
commit
c7abde102f
|
|
@ -255,6 +255,11 @@ config CONSOLE_DISABLE_CTRLC
|
||||||
help
|
help
|
||||||
This disable ctrl+c when CONFIG_BOOTDELAY is 0.
|
This disable ctrl+c when CONFIG_BOOTDELAY is 0.
|
||||||
|
|
||||||
|
config DISABLE_CONSOLE
|
||||||
|
bool "disable console in & out"
|
||||||
|
help
|
||||||
|
This disable console in & out.
|
||||||
|
|
||||||
config IDENT_STRING
|
config IDENT_STRING
|
||||||
string "Board specific string to be added to uboot version string"
|
string "Board specific string to be added to uboot version string"
|
||||||
help
|
help
|
||||||
|
|
|
||||||
|
|
@ -520,6 +520,11 @@ static inline void print_pre_console_buffer(int flushpoint) {}
|
||||||
|
|
||||||
void putc(const char c)
|
void putc(const char c)
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_DISABLE_CONSOLE
|
||||||
|
if (!gd || gd->flags & GD_FLG_DISABLE_CONSOLE)
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_UART
|
#ifdef CONFIG_DEBUG_UART
|
||||||
/* if we don't have a console yet, use the debug UART */
|
/* if we don't have a console yet, use the debug UART */
|
||||||
if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) {
|
if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) {
|
||||||
|
|
@ -536,11 +541,6 @@ void putc(const char c)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DISABLE_CONSOLE
|
|
||||||
if (gd->flags & GD_FLG_DISABLE_CONSOLE)
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!gd->have_console)
|
if (!gd->have_console)
|
||||||
return pre_console_putc(c);
|
return pre_console_putc(c);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue