#include "dx_crys_kernel.h"
/******************************************************************************
-* DEFINITIONS
-******************************************************************************/
+ * DEFINITIONS
+ ******************************************************************************/
/* Dma AXI Secure bit */
#define AXI_SECURE 0
#define _HW_DESC_MONITOR_KICK 0x7FFFC00
/******************************************************************************
-* TYPE DEFINITIONS
-******************************************************************************/
+ * TYPE DEFINITIONS
+ ******************************************************************************/
struct cc_hw_desc {
u32 word[HW_DESC_SIZE_WORDS];
*
* \param pDesc pointer HW descriptor struct
* \param numRounds number of rounds for Multi2
-*/
+ */
#define HW_DESC_SET_MULTI2_NUM_ROUNDS(pDesc, numRounds) \
do { \
CC_REG_FLD_SET(CRY_KERNEL, DSCRPTR_QUEUE_WORD2, VALUE, (pDesc)->word[2], (u32)(numRounds)); \
*
* \param pDesc pointer HW descriptor struct
* \param flowMode Any one of the modes defined in [CC7x-DESC]
-*/
+ */
#define HW_DESC_SET_FLOW_MODE(pDesc, flowMode) \
do { \
*
* \param pDesc pointer HW descriptor struct
* \param cipherMode Any one of the modes defined in [CC7x-DESC]
-*/
+ */
#define HW_DESC_SET_CIPHER_MODE(pDesc, cipherMode) \
do { \
CC_REG_FLD_SET(CRY_KERNEL, DSCRPTR_QUEUE_WORD4, CIPHER_MODE, (pDesc)->word[4], (cipherMode)); \
*
* \param pDesc pointer HW descriptor struct
* \param cipherConfig Any one of the modes defined in [CC7x-DESC]
-*/
+ */
#define HW_DESC_SET_CIPHER_CONFIG0(pDesc, cipherConfig) \
do { \
CC_REG_FLD_SET(CRY_KERNEL, DSCRPTR_QUEUE_WORD4, CIPHER_CONF0, (pDesc)->word[4], (cipherConfig)); \
*
* \param pDesc pointer HW descriptor struct
* \param cipherConfig Any one of the modes defined in [CC7x-DESC]
-*/
+ */
#define HW_DESC_SET_CIPHER_CONFIG1(pDesc, cipherConfig) \
do { \
CC_REG_FLD_SET(CRY_KERNEL, DSCRPTR_QUEUE_WORD4, CIPHER_CONF1, (pDesc)->word[4], (cipherConfig)); \
*
* \param pDesc pointer HW descriptor struct
* \param hwKey The hw key number as in enun HwCryptoKey
-*/
+ */
#define HW_DESC_SET_HW_CRYPTO_KEY(pDesc, hwKey) \
do { \
CC_REG_FLD_SET(CRY_KERNEL, DSCRPTR_QUEUE_WORD4, CIPHER_DO, (pDesc)->word[4], (hwKey) & HW_KEY_MASK_CIPHER_DO); \
*
* \param pDesc pointer HW descriptor struct
* \param swapConfig Any one of the modes defined in [CC7x-DESC]
-*/
+ */
#define HW_DESC_SET_BYTES_SWAP(pDesc, swapConfig) \
do { \
CC_REG_FLD_SET(CRY_KERNEL, DSCRPTR_QUEUE_WORD4, BYTES_SWAP, (pDesc)->word[4], (swapConfig)); \
* This macro sets the CMAC_SIZE0 mode.
*
* \param pDesc pointer HW descriptor struct
-*/
+ */
#define HW_DESC_SET_CMAC_SIZE0_MODE(pDesc) \
do { \
CC_REG_FLD_SET(CRY_KERNEL, DSCRPTR_QUEUE_WORD4, CMAC_SIZE0, (pDesc)->word[4], 0x1); \
*
* \param pDesc pointer HW descriptor struct
* \param keySize key size in bytes (NOT size code)
-*/
+ */
#define HW_DESC_SET_KEY_SIZE_AES(pDesc, keySize) \
do { \
CC_REG_FLD_SET(CRY_KERNEL, DSCRPTR_QUEUE_WORD4, KEY_SIZE, (pDesc)->word[4], ((keySize) >> 3) - 2); \
*
* \param pDesc pointer HW descriptor struct
* \param keySize key size in bytes (NOT size code)
-*/
+ */
#define HW_DESC_SET_KEY_SIZE_DES(pDesc, keySize) \
do { \
CC_REG_FLD_SET(CRY_KERNEL, DSCRPTR_QUEUE_WORD4, KEY_SIZE, (pDesc)->word[4], ((keySize) >> 3) - 1); \
*
* \param pDesc pointer HW descriptor struct
* \param setupMode Any one of the setup modes defined in [CC7x-DESC]
-*/
+ */
#define HW_DESC_SET_SETUP_MODE(pDesc, setupMode) \
do { \
CC_REG_FLD_SET(CRY_KERNEL, DSCRPTR_QUEUE_WORD4, SETUP_OPERATION, (pDesc)->word[4], (setupMode)); \
*
* \param pDesc pointer HW descriptor struct
* \param cipherDo Any one of the cipher do defined in [CC7x-DESC]
-*/
+ */
#define HW_DESC_SET_CIPHER_DO(pDesc, cipherDo) \
do { \
CC_REG_FLD_SET(CRY_KERNEL, DSCRPTR_QUEUE_WORD4, CIPHER_DO, (pDesc)->word[4], (cipherDo) & HW_KEY_MASK_CIPHER_DO); \