Go to the source code of this file.
|
enum | cryp_crypen { CRYP_CRYPEN_DISABLE = 0,
CRYP_CRYPEN_ENABLE = 1
} |
|
enum | cryp_start { CRYP_START_DISABLE = 0,
CRYP_START_ENABLE = 1
} |
|
enum | cryp_init { CRYP_INIT_DISABLE = 0,
CRYP_INIT_ENABLE = 1
} |
|
enum | cryp_state { CRYP_STATE_DISABLE = 0,
CRYP_STATE_ENABLE = 1
} |
|
enum | cryp_key_prep { KSE_DISABLED = 0,
KSE_ENABLED = 1
} |
|
enum | cryp_algo_mode {
CRYP_ALGO_TDES_ECB,
CRYP_ALGO_TDES_CBC,
CRYP_ALGO_DES_ECB,
CRYP_ALGO_DES_CBC,
CRYP_ALGO_AES_ECB,
CRYP_ALGO_AES_CBC,
CRYP_ALGO_AES_CTR,
CRYP_ALGO_AES_XTS
} |
|
enum | cryp_algorithm_dir { CRYP_ALGORITHM_ENCRYPT,
CRYP_ALGORITHM_DECRYPT
} |
|
enum | cryp_mode { CRYP_MODE_POLLING,
CRYP_MODE_INTERRUPT,
CRYP_MODE_DMA
} |
|
enum | cryp_status_id {
CRYP_STATUS_BUSY = 0x10,
CRYP_STATUS_OUTPUT_FIFO_FULL = 0x08,
CRYP_STATUS_OUTPUT_FIFO_NOT_EMPTY = 0x04,
CRYP_STATUS_INPUT_FIFO_NOT_FULL = 0x02,
CRYP_STATUS_INPUT_FIFO_EMPTY = 0x01
} |
|
enum | cryp_dma_req_type { CRYP_DMA_DISABLE_BOTH,
CRYP_DMA_ENABLE_IN_DATA,
CRYP_DMA_ENABLE_OUT_DATA,
CRYP_DMA_ENABLE_BOTH_DIRECTIONS
} |
|
enum | cryp_dma_channel { CRYP_DMA_RX = 0,
CRYP_DMA_TX
} |
|
enum | cryp_key_reg_index { CRYP_KEY_REG_1,
CRYP_KEY_REG_2,
CRYP_KEY_REG_3,
CRYP_KEY_REG_4
} |
|
enum | cryp_init_vector_index { CRYP_INIT_VECTOR_INDEX_0,
CRYP_INIT_VECTOR_INDEX_1
} |
|
|
void | cryp_wait_until_done (struct cryp_device_data *device_data) |
|
int | cryp_check (struct cryp_device_data *device_data) |
|
void | cryp_activity (struct cryp_device_data *device_data, enum cryp_crypen cryp_crypen) |
|
void | cryp_flush_inoutfifo (struct cryp_device_data *device_data) |
|
int | cryp_set_configuration (struct cryp_device_data *device_data, struct cryp_config *cryp_config, u32 *control_register) |
|
void | cryp_configure_for_dma (struct cryp_device_data *device_data, enum cryp_dma_req_type dma_req) |
|
int | cryp_configure_key_values (struct cryp_device_data *device_data, enum cryp_key_reg_index key_reg_index, struct cryp_key_value key_value) |
|
int | cryp_configure_init_vector (struct cryp_device_data *device_data, enum cryp_init_vector_index init_vector_index, struct cryp_init_vector_value init_vector_value) |
|
int | cryp_configure_protection (struct cryp_device_data *device_data, struct cryp_protection_config *p_protect_config) |
|
void | cryp_save_device_context (struct cryp_device_data *device_data, struct cryp_device_context *ctx, int cryp_mode) |
|
void | cryp_restore_device_context (struct cryp_device_data *device_data, struct cryp_device_context *ctx) |
|
int | cryp_is_logic_busy (struct cryp_device_data *device_data) |
|
int | cryp_get_status (struct cryp_device_data *device_data) |
|
int | cryp_write_indata (struct cryp_device_data *device_data, u32 write_data) |
|
int | cryp_read_outdata (struct cryp_device_data *device_data, u32 *read_data) |
|
#define CRYP_KEY_SIZE_128 (0) |
#define CRYP_KEY_SIZE_192 (1) |
#define CRYP_KEY_SIZE_256 (2) |
#define DEV_DBG_NAME "crypX crypX:" |
- Enumerator:
CRYP_ALGO_TDES_ECB |
|
CRYP_ALGO_TDES_CBC |
|
CRYP_ALGO_DES_ECB |
|
CRYP_ALGO_DES_CBC |
|
CRYP_ALGO_AES_ECB |
|
CRYP_ALGO_AES_CBC |
|
CRYP_ALGO_AES_CTR |
|
CRYP_ALGO_AES_XTS |
|
Definition at line 57 of file cryp.h.
- Enumerator:
CRYP_ALGORITHM_ENCRYPT |
|
CRYP_ALGORITHM_DECRYPT |
|
Definition at line 69 of file cryp.h.
- Enumerator:
CRYP_CRYPEN_DISABLE |
|
CRYP_CRYPEN_ENABLE |
|
Definition at line 22 of file cryp.h.
- Enumerator:
-
Definition at line 124 of file cryp.h.
- Enumerator:
CRYP_DMA_DISABLE_BOTH |
|
CRYP_DMA_ENABLE_IN_DATA |
|
CRYP_DMA_ENABLE_OUT_DATA |
|
CRYP_DMA_ENABLE_BOTH_DIRECTIONS |
|
Definition at line 117 of file cryp.h.
- Enumerator:
CRYP_INIT_DISABLE |
|
CRYP_INIT_ENABLE |
|
Definition at line 34 of file cryp.h.
- Enumerator:
CRYP_INIT_VECTOR_INDEX_0 |
|
CRYP_INIT_VECTOR_INDEX_1 |
|
Definition at line 144 of file cryp.h.
- Enumerator:
-
Definition at line 46 of file cryp.h.
- Enumerator:
CRYP_KEY_REG_1 |
|
CRYP_KEY_REG_2 |
|
CRYP_KEY_REG_3 |
|
CRYP_KEY_REG_4 |
|
Definition at line 130 of file cryp.h.
- Enumerator:
CRYP_MODE_POLLING |
|
CRYP_MODE_INTERRUPT |
|
CRYP_MODE_DMA |
|
Definition at line 75 of file cryp.h.
- Enumerator:
CRYP_START_DISABLE |
|
CRYP_START_ENABLE |
|
Definition at line 28 of file cryp.h.
- Enumerator:
CRYP_STATE_DISABLE |
|
CRYP_STATE_ENABLE |
|
Definition at line 40 of file cryp.h.
- Enumerator:
CRYP_STATUS_BUSY |
|
CRYP_STATUS_OUTPUT_FIFO_FULL |
|
CRYP_STATUS_OUTPUT_FIFO_NOT_EMPTY |
|
CRYP_STATUS_INPUT_FIFO_NOT_FULL |
|
CRYP_STATUS_INPUT_FIFO_EMPTY |
|
Definition at line 108 of file cryp.h.
cryp_activity - This routine enables/disable the cryptography function. : Pointer to the device data struct for base address. : Enable/Disable functionality
Definition at line 71 of file cryp.c.
cryp_check - This routine checks Peripheral and PCell Id : Pointer to the device data struct for base address.
Definition at line 33 of file cryp.c.
cryp_configure_for_dma - configures the CRYP IP for DMA operation : Pointer to the device data struct for base address. : Specifies the DMA request type value.
Definition at line 198 of file cryp.c.
cryp_configure_init_vector - configures the initialization vector register : Pointer to the device data struct for base address. : Specifies the index of the init vector. : Specifies the value for the init vector.
Definition at line 256 of file cryp.c.
cryp_configure_key_values - configures the key values for CRYP operations : Pointer to the device data struct for base address. : Key value index register : The key value struct
Definition at line 211 of file cryp.c.
cryp_configure_protection - set the protection bits in the CRYP logic. : Pointer to the device data struct for base address. : Pointer to the protection mode and secure mode configuration
Definition at line 166 of file cryp.c.
cryp_flush_inoutfifo - Resets both the input and the output FIFOs : Pointer to the device data struct for base address.
Definition at line 84 of file cryp.c.
cryp_is_logic_busy - returns the busy status of the CRYP logic : Pointer to the device data struct for base address.
Definition at line 187 of file cryp.c.
cryp_read_outdata - This routine reads the data from the data output register of the CRYP logic : Pointer to the device data struct for base address. : Read the data from the output FIFO.
cryp_restore_device_context - Restore hardware registers and other device context parameter : Pointer to the device data struct for base address. : Crypto device context
Definition at line 351 of file cryp.c.
cryp_save_device_context - Store hardware registers and other device context parameter : Pointer to the device data struct for base address. : Crypto device context
Definition at line 291 of file cryp.c.
cryp_set_configuration - This routine set the cr CRYP IP : Pointer to the device data struct for base address. : Pointer to the configuration parameter : The control register to be written later on.
Definition at line 112 of file cryp.c.
cryp_write_indata - This routine writes 32 bit data into the data input register of the cryptography IP. : Pointer to the device data struct for base address. : Data to write.