risc-v/esp32c3: Prevent double initialization of SHA peripheral

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
Gustavo Henrique Nihei 2022-12-15 19:11:55 -03:00 committed by Petro Karashchenko
parent 7114cc2978
commit 739aca095a
2 changed files with 4 additions and 2 deletions

View File

@ -95,7 +95,8 @@ int esp32c3_bringup(void)
}
#endif
#ifdef CONFIG_ESP32C3_SHA_ACCELERATOR
#if defined(CONFIG_ESP32C3_SHA_ACCELERATOR) && \
!defined(CONFIG_CRYPTO_CRYPTODEV_HARDWARE)
ret = esp32c3_sha_init();
if (ret < 0)
{

View File

@ -126,7 +126,8 @@ int esp32c3_bringup(void)
}
#endif
#ifdef CONFIG_ESP32C3_SHA_ACCELERATOR
#if defined(CONFIG_ESP32C3_SHA_ACCELERATOR) && \
!defined(CONFIG_CRYPTO_CRYPTODEV_HARDWARE)
ret = esp32c3_sha_init();
if (ret < 0)
{