mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-20 19:44:23 +00:00
refactor(st): replace STM32MP_EARLY_CONSOLE with EARLY_CONSOLE
Now that EARLY_CONSOLE is generic, use it instead of the ST flag. Remove stm32mp_setup_early_console() calls as it is done in common TF-A code. Signed-off-by: Yann Gautier <yann.gautier@st.com> Change-Id: Icac29b62a6267303cb5c679d15847c013ead1d23
This commit is contained in:
parent
ae770fedf4
commit
94cad75a35
7 changed files with 3 additions and 21 deletions
|
@ -54,8 +54,6 @@ Other configuration flags:
|
||||||
| Default: stm32mp157c-ev1.dtb
|
| Default: stm32mp157c-ev1.dtb
|
||||||
- | ``DWL_BUFFER_BASE``: the 'serial boot' load address of FIP,
|
- | ``DWL_BUFFER_BASE``: the 'serial boot' load address of FIP,
|
||||||
| default location (end of the first 128MB) is used when absent
|
| default location (end of the first 128MB) is used when absent
|
||||||
- | ``STM32MP_EARLY_CONSOLE``: to enable early traces before clock driver is setup.
|
|
||||||
| Default: 0 (disabled)
|
|
||||||
- | ``STM32MP_RECONFIGURE_CONSOLE``: to re-configure crash console (especially after BL2).
|
- | ``STM32MP_RECONFIGURE_CONSOLE``: to re-configure crash console (especially after BL2).
|
||||||
| Default: 0 (disabled)
|
| Default: 0 (disabled)
|
||||||
- | ``STM32MP_UART_BAUDRATE``: to select UART baud rate.
|
- | ``STM32MP_UART_BAUDRATE``: to select UART baud rate.
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
RESET_TO_BL2 := 1
|
RESET_TO_BL2 := 1
|
||||||
|
|
||||||
STM32MP_EARLY_CONSOLE ?= 0
|
|
||||||
STM32MP_RECONFIGURE_CONSOLE ?= 0
|
STM32MP_RECONFIGURE_CONSOLE ?= 0
|
||||||
STM32MP_UART_BAUDRATE ?= 115200
|
STM32MP_UART_BAUDRATE ?= 115200
|
||||||
|
|
||||||
|
@ -82,7 +81,6 @@ endif
|
||||||
$(eval $(call assert_booleans,\
|
$(eval $(call assert_booleans,\
|
||||||
$(sort \
|
$(sort \
|
||||||
PLAT_XLAT_TABLES_DYNAMIC \
|
PLAT_XLAT_TABLES_DYNAMIC \
|
||||||
STM32MP_EARLY_CONSOLE \
|
|
||||||
STM32MP_EMMC \
|
STM32MP_EMMC \
|
||||||
STM32MP_EMMC_BOOT \
|
STM32MP_EMMC_BOOT \
|
||||||
STM32MP_RAW_NAND \
|
STM32MP_RAW_NAND \
|
||||||
|
@ -104,7 +102,6 @@ $(eval $(call add_defines,\
|
||||||
$(sort \
|
$(sort \
|
||||||
PLAT_XLAT_TABLES_DYNAMIC \
|
PLAT_XLAT_TABLES_DYNAMIC \
|
||||||
STM32_TF_VERSION \
|
STM32_TF_VERSION \
|
||||||
STM32MP_EARLY_CONSOLE \
|
|
||||||
STM32MP_EMMC \
|
STM32MP_EMMC \
|
||||||
STM32MP_EMMC_BOOT \
|
STM32MP_EMMC_BOOT \
|
||||||
STM32MP_RAW_NAND \
|
STM32MP_RAW_NAND \
|
||||||
|
|
|
@ -77,14 +77,6 @@ uintptr_t get_uart_address(uint32_t instance_nb);
|
||||||
/* Setup the UART console */
|
/* Setup the UART console */
|
||||||
int stm32mp_uart_console_setup(void);
|
int stm32mp_uart_console_setup(void);
|
||||||
|
|
||||||
#if STM32MP_EARLY_CONSOLE
|
|
||||||
void stm32mp_setup_early_console(void);
|
|
||||||
#else
|
|
||||||
static inline void stm32mp_setup_early_console(void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Platform util functions for the GPIO driver
|
* Platform util functions for the GPIO driver
|
||||||
* @bank: Target GPIO bank ID as per DT bindings
|
* @bank: Target GPIO bank ID as per DT bindings
|
||||||
|
|
|
@ -269,8 +269,8 @@ int stm32mp_uart_console_setup(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if STM32MP_EARLY_CONSOLE
|
#if EARLY_CONSOLE
|
||||||
void stm32mp_setup_early_console(void)
|
void plat_setup_early_console(void)
|
||||||
{
|
{
|
||||||
#if defined(IMAGE_BL2) || STM32MP_RECONFIGURE_CONSOLE
|
#if defined(IMAGE_BL2) || STM32MP_RECONFIGURE_CONSOLE
|
||||||
plat_crash_console_init();
|
plat_crash_console_init();
|
||||||
|
@ -278,7 +278,7 @@ void stm32mp_setup_early_console(void)
|
||||||
set_console(STM32MP_DEBUG_USART_BASE, STM32MP_DEBUG_USART_CLK_FRQ);
|
set_console(STM32MP_DEBUG_USART_BASE, STM32MP_DEBUG_USART_CLK_FRQ);
|
||||||
NOTICE("Early console setup\n");
|
NOTICE("Early console setup\n");
|
||||||
}
|
}
|
||||||
#endif /* STM32MP_EARLY_CONSOLE */
|
#endif /* EARLY_CONSOLE */
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* plat_is_smccc_feature_available() - This function checks whether SMCCC
|
* plat_is_smccc_feature_available() - This function checks whether SMCCC
|
||||||
|
|
|
@ -142,8 +142,6 @@ void bl2_el3_early_platform_setup(u_register_t arg0,
|
||||||
u_register_t arg2 __unused,
|
u_register_t arg2 __unused,
|
||||||
u_register_t arg3 __unused)
|
u_register_t arg3 __unused)
|
||||||
{
|
{
|
||||||
stm32mp_setup_early_console();
|
|
||||||
|
|
||||||
stm32mp_save_boot_ctx_address(arg0);
|
stm32mp_save_boot_ctx_address(arg0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -116,8 +116,6 @@ void sp_min_early_platform_setup2(u_register_t arg0, u_register_t arg1,
|
||||||
bl_params_t *params_from_bl2 = (bl_params_t *)arg0;
|
bl_params_t *params_from_bl2 = (bl_params_t *)arg0;
|
||||||
uintptr_t dt_addr = arg1;
|
uintptr_t dt_addr = arg1;
|
||||||
|
|
||||||
stm32mp_setup_early_console();
|
|
||||||
|
|
||||||
/* Imprecise aborts can be masked in NonSecure */
|
/* Imprecise aborts can be masked in NonSecure */
|
||||||
write_scr(read_scr() | SCR_AW_BIT);
|
write_scr(read_scr() | SCR_AW_BIT);
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@ void bl2_el3_early_platform_setup(u_register_t arg0 __unused,
|
||||||
u_register_t arg2 __unused,
|
u_register_t arg2 __unused,
|
||||||
u_register_t arg3 __unused)
|
u_register_t arg3 __unused)
|
||||||
{
|
{
|
||||||
stm32mp_setup_early_console();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void bl2_platform_setup(void)
|
void bl2_platform_setup(void)
|
||||||
|
|
Loading…
Add table
Reference in a new issue