mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user