fix(st-gpio): configure each GPIO mux as secure for STM32MP2

GPIOs are configured as secure by default on STM32MP2. The former code
is then put under #if STM32MP13 || STM32MP15. The else part is for
STM32MP2 family.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>
Change-Id: I80c5944d4ae662f9e28269c3dc543b13f0e26a7b
This commit is contained in:
Christophe Kerello 2023-11-08 18:59:07 +01:00 committed by Yann Gautier
parent bfa5f61b57
commit 179a130aea

View file

@ -282,6 +282,7 @@ static void set_gpio(uint32_t bank, uint32_t pin, uint32_t mode, uint32_t type,
clk_disable(clock); clk_disable(clock);
#if STM32MP13 || STM32MP15
if (status == DT_SECURE) { if (status == DT_SECURE) {
stm32mp_register_secure_gpio(bank, pin); stm32mp_register_secure_gpio(bank, pin);
#if !IMAGE_BL2 #if !IMAGE_BL2
@ -294,6 +295,9 @@ static void set_gpio(uint32_t bank, uint32_t pin, uint32_t mode, uint32_t type,
set_gpio_secure_cfg(bank, pin, false); set_gpio_secure_cfg(bank, pin, false);
#endif #endif
} }
#else /* !STM32MP13 && !STM32MP15 */
set_gpio_secure_cfg(bank, pin, true);
#endif /* STM32MP13 || STM32MP15 */
} }
void set_gpio_secure_cfg(uint32_t bank, uint32_t pin, bool secure) void set_gpio_secure_cfg(uint32_t bank, uint32_t pin, bool secure)