FreeRTOS port on GAP8/RISC-V
|
Data Structures | |
struct | aes_config_data_s |
struct | aes_itf_data_s |
Functions | |
static void | __aes_drv_fifo_enqueue (struct aes_itf_data_s *itf_data, pi_task_t *pi_task) |
static pi_task_t * | __aes_drv_fifo_pop (struct aes_itf_data_s *itf_data) |
void | __pi_aes_conf_init (struct pi_aes_conf *conf) |
Init aes configuration structure. More... | |
int32_t | __pi_aes_open (struct pi_aes_conf *conf, struct aes_config_data_s **device_data) |
Open aes device. More... | |
void | __pi_aes_close (struct aes_config_data_s *conf_data) |
Close aes device. More... | |
int32_t | __pi_aes_crypt_async (struct aes_config_data_s *conf_data, uint8_t is_encrypt, void *src, void *dst, uint16_t len, pi_task_t *task) |
launch an encrypt/decrypt operation More... | |
void | __pi_aes_stop_fifo_mode (struct aes_config_data_s *conf_data) |
stop the fifo mode and resume normal mode More... | |
|
inlinestatic |
References aes_itf_data_s::fifo_head, and aes_itf_data_s::fifo_tail.
Referenced by __pi_aes_crypt_async().
|
inlinestatic |
References aes_itf_data_s::fifo_head, aes_itf_data_s::fifo_tail, and hal_compiler_barrier().
Referenced by __pi_aes_event_handler_internal().
void __pi_aes_close | ( | struct aes_config_data_s * | conf_data | ) |
conf_data | Device data |
References AES_TRACE, aes_itf_data_s::device_id, hal_soc_eu_clear_fc_mask(), hal_udma_core_lin_get(), hal_udma_core_lin_reset(), hal_udma_ctrl_cg_enable(), hal_udma_ctrl_reset_enable(), aes_config_data_s::itf_data, aes_itf_data_s::latest_conf, aes_itf_data_s::nb_open, pi_data_free, pi_fc_l1_free(), pi_udma_core_lin_free(), aes_itf_data_s::rx_chan_id, SOC_EVENT_UDMA_CHAN_LIN, aes_itf_data_s::tx_chan_id, and UDMA_AES_ID.
Referenced by pi_aes_close().
void __pi_aes_conf_init | ( | struct pi_aes_conf * | conf | ) |
conf | Pointer to aes conf. |
Referenced by pi_aes_conf_init().
int32_t __pi_aes_crypt_async | ( | struct aes_config_data_s * | conf_data, |
uint8_t | is_encrypt, | ||
void * | src, | ||
void * | dst, | ||
uint16_t | len, | ||
pi_task_t * | task | ||
) |
conf_data | Pointer to driver data. |
is_encrypt | if flag is set, then operation is an encryption else it is a decryption. |
src | Source data |
dst | Destination data |
len | Data length |
task | Pointer to struct pi_task. |
References __aes_drv_fifo_enqueue(), __pi_aes_crypt_start(), AES_TRACE, pi_task_t::data, disable_irq(), aes_itf_data_s::end_task, aes_config_data_s::itf_data, and restore_irq().
Referenced by pi_aes_decrypt_async(), and pi_aes_encrypt_async().
int32_t __pi_aes_open | ( | struct pi_aes_conf * | conf, |
struct aes_config_data_s ** | device_data | ||
) |
conf | Pointer to aes conf. |
device_data | Pointer to device data. |
0 | Operation is successful. |
ERRNO | Error code. |
References __pi_aes_event_handler(), __pi_aes_null_handler(), AES_TRACE, AES_TRACE_ERR, aes_itf_data_s::device_id, aes_itf_data_s::end_task, aes_itf_data_s::fifo_head, aes_itf_data_s::fifo_tail, hal_soc_eu_set_fc_mask(), hal_udma_ctrl_cg_disable(), hal_udma_ctrl_reset_disable(), aes_itf_data_s::latest_conf, aes_itf_data_s::nb_open, pi_data_malloc, pi_fc_l1_malloc(), pi_udma_core_lin_alloc(), aes_itf_data_s::rx_chan_id, SOC_EVENT_UDMA_CHAN_LIN, aes_itf_data_s::tx_chan_id, and UDMA_AES_ID.
Referenced by pi_aes_open().
void __pi_aes_stop_fifo_mode | ( | struct aes_config_data_s * | conf_data | ) |
conf_data | Pointer to driver data. |
References __pi_aes_event_handler_internal(), and aes_config_data_s::itf_data.
Referenced by pi_aes_ioctl().