From 23acf1af858f25879c072f619aab4c575e1bb973 Mon Sep 17 00:00:00 2001 From: Etienne Carriere Date: Wed, 23 Oct 2024 10:36:25 +0200 Subject: [PATCH] plat-stm32mp1: remove unused stm32mp_nsec_can_access_reset() Remove unused platform functions stm32mp_nsec_can_access_reset() and stm32mp_gpio_bank_is_non_secure(). Signed-off-by: Etienne Carriere --- .../arch/arm/plat-stm32mp1/shared_resources.c | 42 ------------------- core/arch/arm/plat-stm32mp1/stm32_util.h | 10 ----- 2 files changed, 52 deletions(-) diff --git a/core/arch/arm/plat-stm32mp1/shared_resources.c b/core/arch/arm/plat-stm32mp1/shared_resources.c index 5f79d46b16b..62ba479b469 100644 --- a/core/arch/arm/plat-stm32mp1/shared_resources.c +++ b/core/arch/arm/plat-stm32mp1/shared_resources.c @@ -298,48 +298,6 @@ bool stm32mp_periph_is_secure(enum stm32mp_shres id) return shres_state[id] == SHRES_SECURE; } -bool stm32mp_nsec_can_access_reset(unsigned int reset_id) -{ - enum stm32mp_shres shres_id = STM32MP1_SHRES_COUNT; - - switch (reset_id) { - case GPIOZ_R: - return false; - case SPI6_R: - shres_id = STM32MP1_SHRES_SPI6; - break; - case I2C4_R: - shres_id = STM32MP1_SHRES_I2C4; - break; - case I2C6_R: - shres_id = STM32MP1_SHRES_I2C6; - break; - case USART1_R: - shres_id = STM32MP1_SHRES_USART1; - break; - case CRYP1_R: - shres_id = STM32MP1_SHRES_CRYP1; - break; - case HASH1_R: - shres_id = STM32MP1_SHRES_HASH1; - break; - case RNG1_R: - shres_id = STM32MP1_SHRES_RNG1; - break; - case MDMA_R: - shres_id = STM32MP1_SHRES_MDMA; - break; - case MCU_R: - case MCU_HOLD_BOOT_R: - shres_id = STM32MP1_SHRES_MCU; - break; - default: - return false; - } - - return !stm32mp_periph_is_secure(shres_id); -} - static bool mckprot_resource(enum stm32mp_shres id) { switch (id) { diff --git a/core/arch/arm/plat-stm32mp1/stm32_util.h b/core/arch/arm/plat-stm32mp1/stm32_util.h index ab1ac8f77a7..0e9958af5db 100644 --- a/core/arch/arm/plat-stm32mp1/stm32_util.h +++ b/core/arch/arm/plat-stm32mp1/stm32_util.h @@ -48,16 +48,6 @@ struct clk *stm32mp_rcc_clock_id_to_clk(unsigned long clock_id); extern const struct clk_ops stm32mp1_clk_ops; -#ifdef CFG_STM32MP1_SHARED_RESOURCES -/* Return true if and only if @reset_id relates to a non-secure peripheral */ -bool stm32mp_nsec_can_access_reset(unsigned int reset_id); -#else /* CFG_STM32MP1_SHARED_RESOURCES */ -static inline bool stm32mp_nsec_can_access_reset(unsigned int reset_id __unused) -{ - return true; -} -#endif /* CFG_STM32MP1_SHARED_RESOURCES */ - /* Return rstctrl instance related to RCC reset controller DT binding ID */ struct rstctrl *stm32mp_rcc_reset_id_to_rstctrl(unsigned int binding_id);