feat(esp_tee): Enable GDMA burst mode for AES/SHA operations

- Co-authored-by: Harshal Patil <harshal.patil@espressif.com>
This commit is contained in:
Laukik Hase
2026-03-10 19:38:34 +05:30
parent 7d4436028d
commit f2b640df49
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -53,6 +53,10 @@
#define dma_ll_rx_stop DMA_LL_FUNC(rx_stop)
#define dma_ll_tx_set_priority DMA_LL_FUNC(tx_set_priority)
#define dma_ll_rx_set_priority DMA_LL_FUNC(rx_set_priority)
#if SOC_AHB_GDMA_VERSION == 2
#define dma_ll_tx_set_burst_size DMA_LL_FUNC(tx_set_burst_size)
#define dma_ll_rx_set_burst_size DMA_LL_FUNC(rx_set_burst_size)
#endif
/*
* NOTE: [ESP-TEE] This is a low-level (LL), non-OS version of
@@ -70,10 +74,16 @@ static void crypto_shared_gdma_init(void)
dma_ll_force_enable_reg_clock(&DMA_DEV, true);
// setting the transfer ability
#if SOC_AHB_GDMA_VERSION == 2
dma_ll_rx_enable_data_burst(&DMA_DEV, TEE_CRYPTO_GDMA_CH, true);
dma_ll_rx_set_burst_size(&DMA_DEV, TEE_CRYPTO_GDMA_CH, 16);
dma_ll_tx_set_burst_size(&DMA_DEV, TEE_CRYPTO_GDMA_CH, 16);
#else
dma_ll_rx_enable_data_burst(&DMA_DEV, TEE_CRYPTO_GDMA_CH, false);
#endif
dma_ll_tx_enable_data_burst(&DMA_DEV, TEE_CRYPTO_GDMA_CH, true);
dma_ll_tx_enable_descriptor_burst(&DMA_DEV, TEE_CRYPTO_GDMA_CH, true);
dma_ll_rx_enable_data_burst(&DMA_DEV, TEE_CRYPTO_GDMA_CH, false);
dma_ll_rx_enable_descriptor_burst(&DMA_DEV, TEE_CRYPTO_GDMA_CH, true);
dma_ll_tx_reset_channel(&DMA_DEV, TEE_CRYPTO_GDMA_CH);