aboutsummaryrefslogtreecommitdiff
path: root/common/Kconfig
diff options
context:
space:
mode:
authorPali Rohár2022-09-05 11:31:17 +0200
committerTom Rini2022-09-24 10:47:01 -0400
commit974f48366f5b151f13b91961ec7721e74fb54fa9 (patch)
tree33cdbd83ade215b051708c04b9badd02dca9e64c /common/Kconfig
parent7df5b353347621cca0eef7420ba045bf852e778a (diff)
console: Implement flush() function
On certain places it is required to flush output print buffers to ensure that text strings were sent to console or serial devices. For example when printing message that U-Boot is going to boot kernel or when U-Boot is going to change baudrate of terminal device. Therefore introduce a new flush() and fflush() functions into console code. These functions will call .flush callback of associated stdio_dev device. As this function may increase U-Boot side, allow to compile U-Boot without this function. For this purpose there is a new config CONSOLE_FLUSH_SUPPORT which is enabled by default and can be disabled. It is a good idea to have this option enabled for all boards which have enough space for it. When option is disabled when U-Boot defines just empty static inline function fflush() to avoid ifdefs in other code. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/Kconfig')
-rw-r--r--common/Kconfig6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/Kconfig b/common/Kconfig
index b776c5ca1ec..6591acd2fd0 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -186,6 +186,12 @@ config PRE_CON_BUF_ADDR
We should consider removing this option and allocating the memory
in board_init_f_init_reserve() instead.
+config CONSOLE_FLUSH_SUPPORT
+ bool "Enable console flush support"
+ default y
+ help
+ This enables compilation of flush() function for console flush support.
+
config CONSOLE_MUX
bool "Enable console multiplexing"
default y if DM_VIDEO || VIDEO || LCD