mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 09:34:18 +00:00
refactor(st): configure UART baudrate
Add the possibility to configure console UART baudrate, it can be passed as a command line parameter with STM32MP_UART_BAUDRATE. The default value remains 115200. Signed-off-by: Yann Gautier <yann.gautier@foss.st.com> Change-Id: I000df70c10b2b4dac1449556596f9820c36cf243
This commit is contained in:
parent
975cf6ff51
commit
99887cb904
4 changed files with 6 additions and 2 deletions
|
@ -127,6 +127,8 @@ Other configuration flags:
|
|||
| Default: stm32mp157c-ev1.dtb
|
||||
- | ``STM32MP_EARLY_CONSOLE``: to enable early traces before clock driver is setup.
|
||||
| Default: 0 (disabled)
|
||||
- | ``STM32MP_UART_BAUDRATE``: to select UART baud rate.
|
||||
| Default: 115200
|
||||
- | ``STM32_TF_VERSION``: to manage BL2 monotonic counter.
|
||||
| Default: 0
|
||||
|
||||
|
|
|
@ -210,7 +210,7 @@ static void set_console(uintptr_t base, uint32_t clk_rate)
|
|||
unsigned int console_flags;
|
||||
|
||||
if (console_stm32_register(base, clk_rate,
|
||||
STM32MP_UART_BAUDRATE, &console) == 0) {
|
||||
(uint32_t)STM32MP_UART_BAUDRATE, &console) == 0) {
|
||||
panic();
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ BL2_AT_EL3 := 1
|
|||
USE_COHERENT_MEM := 0
|
||||
|
||||
STM32MP_EARLY_CONSOLE ?= 0
|
||||
STM32MP_UART_BAUDRATE ?= 115200
|
||||
|
||||
# Allow TF-A to concatenate BL2 & BL32 binaries in a single file,
|
||||
# share DTB file between BL2 and BL32
|
||||
|
@ -172,6 +173,7 @@ $(eval $(call assert_numerics,\
|
|||
PLAT_PARTITION_MAX_ENTRIES \
|
||||
STM32_TF_A_COPIES \
|
||||
STM32_TF_VERSION \
|
||||
STM32MP_UART_BAUDRATE \
|
||||
)))
|
||||
|
||||
$(eval $(call add_defines,\
|
||||
|
@ -189,6 +191,7 @@ $(eval $(call add_defines,\
|
|||
STM32MP_SDMMC \
|
||||
STM32MP_SPI_NAND \
|
||||
STM32MP_SPI_NOR \
|
||||
STM32MP_UART_BAUDRATE \
|
||||
STM32MP_UART_PROGRAMMER \
|
||||
STM32MP_USB_PROGRAMMER \
|
||||
STM32MP_USE_STM32IMAGE \
|
||||
|
|
|
@ -202,7 +202,6 @@ enum ddr_type {
|
|||
#define USART6_BASE U(0x44003000)
|
||||
#define UART7_BASE U(0x40018000)
|
||||
#define UART8_BASE U(0x40019000)
|
||||
#define STM32MP_UART_BAUDRATE U(115200)
|
||||
|
||||
/* For UART crash console */
|
||||
#define STM32MP_DEBUG_USART_BASE UART4_BASE
|
||||
|
|
Loading…
Add table
Reference in a new issue