From f516fd99ec59d964836906c8ac370f246d60c14d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 14 Nov 2019 12:57:23 -0700 Subject: common: Move serial_printf() to the serial header Move this function header to serial.h since this function is clearly related to serial. The function itself stays in console.c since we don't have a single serial file. DM and non-DM each has a separate file so we would have to either create a new common serial file, or repeat the function in both serial.c and serial-uclass.c, neither of which seem worthwhile. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- include/serial.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/serial.h') diff --git a/include/serial.h b/include/serial.h index 38a1cc99ae2..8d1803c8003 100644 --- a/include/serial.h +++ b/include/serial.h @@ -324,4 +324,15 @@ void pl01x_serial_initialize(void); void pxa_serial_initialize(void); void sh_serial_initialize(void); +/** + * serial_printf() - Write a formatted string to the serial console + * + * The total size of the output must be less than CONFIG_SYS_PBSIZE. + * + * @fmt: Printf format string, followed by format arguments + * @return number of characters written + */ +int serial_printf(const char *fmt, ...) + __attribute__ ((format (__printf__, 1, 2))); + #endif -- cgit v1.2.3