From 85fcf9416032dea49c3a82816f03e528019dea9e Mon Sep 17 00:00:00 2001
From: Dzmitry Sankouski <dsankouski@gmail.com>
Date: Sun, 17 Oct 2021 13:45:39 +0300
Subject: [PATCH] serial: samsung: add support for skip debug init in s5p

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

diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c
index 53a7b0bd1b..de420d2d94 100644
--- a/drivers/serial/serial_s5p.c
+++ b/drivers/serial/serial_s5p.c
@@ -273,6 +273,9 @@ U_BOOT_DRIVER(serial_s5p) = {
 
 static inline void _debug_uart_init(void)
 {
+	if (IS_ENABLED(CONFIG_DEBUG_UART_SKIP_INIT))
+		return;
+
 	struct s5p_uart *uart = (struct s5p_uart *)CONFIG_DEBUG_UART_BASE;
 
 	s5p_serial_init(uart);
-- 
2.39.5