serial: stm32: restrict _debug_uart_init() usage
authorPatrice Chotard <patrice.chotard@foss.st.com>
Thu, 30 Jan 2025 11:57:54 +0000 (12:57 +0100)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Wed, 12 Mar 2025 15:44:31 +0000 (16:44 +0100)
commit1a87755ecd0d36ec29acdbcbc9b381e76cfd6cfd
tree7ae18d6ac68c4b3ba6f08a27d94eaad8ec68b975
parent2cc38eb83c4c7752c56bd27baa6c7aaf87d2867b
serial: stm32: restrict _debug_uart_init() usage

Since commit 948da7773e34 ("arm: Add new config option ARCH_VERY_EARLY_INIT")
debug_uart_init() is called respectively in crt0.S and crt0_64.S.
That means that _debug_uart_init() is called for all STM32MP platforms
even for those which doesn't support SPL_BUILD.

So restrict _debug_uart_init() execution for platforms which can have
SPL_BUILD enabled (STM32MP1 platform only).

It's more needed to call debug_uart_init() in stm32mp1/cpu.c.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
arch/arm/mach-stm32mp/stm32mp1/cpu.c
drivers/serial/serial_stm32.c