|
1 | 1 | /* |
2 | | - * SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD |
| 2 | + * SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD |
3 | 3 | * |
4 | 4 | * SPDX-License-Identifier: Apache-2.0 |
5 | 5 | */ |
@@ -109,50 +109,6 @@ static esp_err_t crypto_shared_gdma_init(void) |
109 | 109 | return ret; |
110 | 110 | } |
111 | 111 |
|
112 | | -esp_err_t esp_crypto_shared_gdma_start(const lldesc_t *input, const lldesc_t *output, gdma_trigger_peripheral_t peripheral) |
113 | | -{ |
114 | | - int rx_ch_id = 0; |
115 | | - esp_err_t ret = ESP_OK; |
116 | | - |
117 | | - if (tx_channel == NULL) { |
118 | | - /* Allocate a pair of RX and TX for crypto, should only happen the first time we use the GMDA |
119 | | - or if user called esp_crypto_shared_gdma_release */ |
120 | | - ret = crypto_shared_gdma_init(); |
121 | | - } |
122 | | - |
123 | | - if (ret != ESP_OK) { |
124 | | - return ret; |
125 | | - } |
126 | | - |
127 | | - /* Tx channel is shared between AES and SHA, need to connect to peripheral every time */ |
128 | | - gdma_disconnect(tx_channel); |
129 | | - |
130 | | -#ifdef SOC_SHA_SUPPORTED |
131 | | - if (peripheral == GDMA_TRIG_PERIPH_SHA) { |
132 | | - gdma_connect(tx_channel, GDMA_MAKE_TRIGGER(GDMA_TRIG_PERIPH_SHA, 0)); |
133 | | - } else |
134 | | -#endif // SOC_SHA_SUPPORTED |
135 | | -#ifdef SOC_AES_SUPPORTED |
136 | | - if (peripheral == GDMA_TRIG_PERIPH_AES) { |
137 | | - gdma_connect(tx_channel, GDMA_MAKE_TRIGGER(GDMA_TRIG_PERIPH_AES, 0)); |
138 | | - } else |
139 | | -#endif // SOC_AES_SUPPORTED |
140 | | - { |
141 | | - return ESP_ERR_INVALID_ARG; |
142 | | - } |
143 | | - |
144 | | - /* tx channel is reset by gdma_connect(), also reset rx to ensure a known state */ |
145 | | - gdma_get_channel_id(rx_channel, &rx_ch_id); |
146 | | - |
147 | | -#if SOC_AHB_GDMA_VERSION == 1 |
148 | | - gdma_ll_rx_reset_channel(&GDMA, rx_ch_id); |
149 | | -#endif /* SOC_AHB_GDMA_VERSION */ |
150 | | - |
151 | | - gdma_start(tx_channel, (intptr_t)input); |
152 | | - gdma_start(rx_channel, (intptr_t)output); |
153 | | - |
154 | | - return ESP_OK; |
155 | | -} |
156 | 112 |
|
157 | 113 | /* The external memory ecc-aes access must be enabled when there exists |
158 | 114 | at least one buffer in the DMA descriptors that resides in external memory. */ |
|
0 commit comments