]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
serial: atmel-usart: add support for skiping debug UART init
authorRobert Marko <robert.marko@sartura.hr>
Mon, 12 Jan 2026 13:12:42 +0000 (14:12 +0100)
committerEugen Hristev <eugen.hristev@linaro.org>
Wed, 4 Feb 2026 12:12:56 +0000 (14:12 +0200)
Currently, atmel-usart does not respect CONFIG_DEBUG_UART_SKIP_INIT so
it will always configure the debug UART.

However, this is unwanted on platforms on which TF-A or some other firmware
has already configured the debug UART.

This will be used for Microchip LAN969x support, so simply return early if
CONFIG_DEBUG_UART_SKIP_INIT is set.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
drivers/serial/atmel_usart.c

index fb1c76fea8d6a35e844f80791c770b3d74f87b8f..e1db4dfe00d1281ed120e66c3dc2ae1ee0d46c53 100644 (file)
@@ -318,6 +318,9 @@ static inline void _debug_uart_init(void)
 {
        atmel_usart3_t *usart = (atmel_usart3_t *)CONFIG_VAL(DEBUG_UART_BASE);
 
+       if (IS_ENABLED(CONFIG_DEBUG_UART_SKIP_INIT))
+               return;
+
        _atmel_serial_init(usart, CONFIG_DEBUG_UART_CLOCK, CONFIG_BAUDRATE);
 }