From 9f971ff71498a34f533e341a7e0d00ec75d9fc5b Mon Sep 17 00:00:00 2001
From: =?utf8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
Date: Fri, 6 May 2022 11:05:15 +0200
Subject: [PATCH] serial: Add new config option SPL_DEBUG_UART_BASE
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

SPL_DEBUG_UART_BASE is same as DEBUG_UART_BASE, but applies only for SPL.

In some cases base address of UART is different in SPL and proper U-Boot.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
---
 drivers/serial/Kconfig | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index 26fa498bbb..46726d76b1 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -508,6 +508,13 @@ config DEBUG_UART_BASE
 	  A default should be provided by your board, but if not you will need
 	  to use the correct value here.
 
+config SPL_DEBUG_UART_BASE
+	hex "Base address of UART for SPL"
+	depends on SPL && DEBUG_UART
+	default DEBUG_UART_BASE
+	help
+	  This is the base address of your UART for memory-mapped UARTs for SPL.
+
 config DEBUG_UART_CLOCK
 	int "UART input clock"
 	depends on DEBUG_UART
-- 
2.39.5