Skip to content

Commit

Permalink
plat-stm32mp1: remove unused stm32mp_nsec_can_access_reset()
Browse files Browse the repository at this point in the history
Remove unused platform functions stm32mp_nsec_can_access_reset()
and stm32mp_gpio_bank_is_non_secure().

Signed-off-by: Etienne Carriere <[email protected]>
  • Loading branch information
etienne-lms committed Dec 6, 2024
1 parent 621046b commit 23acf1a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 52 deletions.
42 changes: 0 additions & 42 deletions core/arch/arm/plat-stm32mp1/shared_resources.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
10 changes: 0 additions & 10 deletions core/arch/arm/plat-stm32mp1/stm32_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 23acf1a

Please sign in to comment.