mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
Merge branch 'change/ecdsa_does_not_use_mpi_esp32h2_eco5_v5.4' into 'release/v5.4'
The ECDSA module of ESP32-H2 ECO5 does not use the MPI module (v5.4) See merge request espressif/esp-idf!41219
This commit is contained in:
@@ -418,6 +418,14 @@ static inline bool ecdsa_ll_is_deterministic_mode_supported(void)
|
||||
return ESP_CHIP_REV_ABOVE(efuse_hal_chip_revision(), 102);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check if the ECDSA peripheral uses MPI module's memory
|
||||
*/
|
||||
static inline bool ecdsa_ll_is_mpi_required(void)
|
||||
{
|
||||
return !ESP_CHIP_REV_ABOVE(efuse_hal_chip_revision(), 102);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -440,6 +440,14 @@ static inline bool ecdsa_ll_is_deterministic_mode_supported(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check if the ECDSA peripheral uses MPI module's memory
|
||||
*/
|
||||
static inline bool ecdsa_ll_is_mpi_required(void)
|
||||
{
|
||||
return true; // TODO: IDF-13523
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -45,9 +45,11 @@ static void ecdsa_enable_and_reset(void)
|
||||
}
|
||||
|
||||
#ifdef SOC_ECDSA_USES_MPI
|
||||
MPI_RCC_ATOMIC() {
|
||||
mpi_ll_enable_bus_clock(true);
|
||||
mpi_ll_reset_register();
|
||||
if (ecdsa_ll_is_mpi_required()) {
|
||||
MPI_RCC_ATOMIC() {
|
||||
mpi_ll_enable_bus_clock(true);
|
||||
mpi_ll_reset_register();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -55,8 +57,10 @@ static void ecdsa_enable_and_reset(void)
|
||||
static void ecdsa_disable(void)
|
||||
{
|
||||
#ifdef SOC_ECDSA_USES_MPI
|
||||
MPI_RCC_ATOMIC() {
|
||||
mpi_ll_enable_bus_clock(false);
|
||||
if (ecdsa_ll_is_mpi_required()) {
|
||||
MPI_RCC_ATOMIC() {
|
||||
mpi_ll_enable_bus_clock(false);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user