[PATCH 1/4] serial: samsung: add support for skip debug init in s5p

Dzmitry Sankouski dsankouski at gmail.com
Tue Oct 12 17:41:26 CEST 2021


Signed-off-by: Dzmitry Sankouski <dsankouski at gmail.com>
Cc: Minkyu Kang <mk7.kang at samsung.com>
---
 drivers/serial/serial_s5p.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c
index 6d09952a5d..caa9a4e5c1 100644
--- a/drivers/serial/serial_s5p.c
+++ b/drivers/serial/serial_s5p.c
@@ -221,10 +221,12 @@ U_BOOT_DRIVER(serial_s5p) = {
 
 static inline void _debug_uart_init(void)
 {
-	struct s5p_uart *uart = (struct s5p_uart *)CONFIG_DEBUG_UART_BASE;
+	if (IS_ENABLED(CONFIG_DEBUG_UART_SKIP_INIT)) {
+		struct s5p_uart *uart = (struct s5p_uart *)CONFIG_DEBUG_UART_BASE;
 
-	s5p_serial_init(uart);
-	s5p_serial_baud(uart, CONFIG_DEBUG_UART_CLOCK, CONFIG_BAUDRATE);
+		s5p_serial_init(uart);
+		s5p_serial_baud(uart, CONFIG_DEBUG_UART_CLOCK, CONFIG_BAUDRATE);
+	}
 }
 
 static inline void _debug_uart_putc(int ch)
-- 
2.20.1



More information about the U-Boot mailing list