mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 09:34:18 +00:00
feat(st-uart): manage STM32MP_RECONFIGURE_CONSOLE
If the flag STM32MP_RECONFIGURE_CONSOLE is set in BL32, the UART init should be skipped if the UART clock is set to zero. This will be used when configuring the default console, after an early console has been configured. Signed-off-by: Yann Gautier <yann.gautier@foss.st.com> Change-Id: Icbc640c7bdd6342f9c3ec1586a0d0c64127b18b8
This commit is contained in:
parent
156709ddde
commit
ea69dcdc73
1 changed files with 6 additions and 0 deletions
|
@ -46,10 +46,16 @@ func console_stm32_core_init
|
|||
cmp r0, #0
|
||||
beq core_init_fail
|
||||
#if !defined(IMAGE_BL2)
|
||||
#if STM32MP_RECONFIGURE_CONSOLE
|
||||
/* UART clock rate is set to 0 in BL32, skip init in that case */
|
||||
cmp r1, #0
|
||||
beq 1f
|
||||
#else /* STM32MP_RECONFIGURE_CONSOLE */
|
||||
/* Skip UART initialization if it is already enabled */
|
||||
ldr r3, [r0, #USART_CR1]
|
||||
ands r3, r3, #USART_CR1_UE
|
||||
bne 1f
|
||||
#endif /* STM32MP_RECONFIGURE_CONSOLE */
|
||||
#endif /* IMAGE_BL2 */
|
||||
/* Check baud rate and uart clock for sanity */
|
||||
cmp r1, #0
|
||||
|
|
Loading…
Add table
Reference in a new issue