mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 09:34:18 +00:00
fix(stm32mp1): rework DWL buffer cache invalidation
As the default part do nothing, all the code managing DWL buffer cache invalidation can be under programmer flags. This avoids running unneeded code if the flags are not enabled, and corrects MISRA C2012-16.6: Every switch statement shall have at least two switch-clauses. Signed-off-by: Yann Gautier <yann.gautier@st.com> Change-Id: I90d2951f9518509b3380295fb1a6ad6b9c5e551e
This commit is contained in:
parent
d7f5bed90e
commit
127ed0008e
1 changed files with 4 additions and 9 deletions
|
@ -543,20 +543,15 @@ int bl2_plat_handle_post_image_load(unsigned int image_id)
|
|||
|
||||
void bl2_el3_plat_prepare_exit(void)
|
||||
{
|
||||
#if STM32MP_UART_PROGRAMMER || STM32MP_USB_PROGRAMMER
|
||||
uint16_t boot_itf = stm32mp_get_boot_itf_selected();
|
||||
|
||||
switch (boot_itf) {
|
||||
#if STM32MP_UART_PROGRAMMER || STM32MP_USB_PROGRAMMER
|
||||
case BOOT_API_CTX_BOOT_INTERFACE_SEL_SERIAL_UART:
|
||||
case BOOT_API_CTX_BOOT_INTERFACE_SEL_SERIAL_USB:
|
||||
if ((boot_itf == BOOT_API_CTX_BOOT_INTERFACE_SEL_SERIAL_UART) ||
|
||||
(boot_itf == BOOT_API_CTX_BOOT_INTERFACE_SEL_SERIAL_USB)) {
|
||||
/* Invalidate the downloaded buffer used with io_memmap */
|
||||
inv_dcache_range(DWL_BUFFER_BASE, DWL_BUFFER_SIZE);
|
||||
break;
|
||||
#endif /* STM32MP_UART_PROGRAMMER || STM32MP_USB_PROGRAMMER */
|
||||
default:
|
||||
/* Do nothing in default case */
|
||||
break;
|
||||
}
|
||||
#endif /* STM32MP_UART_PROGRAMMER || STM32MP_USB_PROGRAMMER */
|
||||
|
||||
stm32mp1_security_setup();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue