Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
desc_constr.h File Reference
#include "desc.h"

Go to the source code of this file.

Macros

#define IMMEDIATE   (1 << 23)
 
#define CAAM_CMD_SZ   sizeof(u32)
 
#define CAAM_PTR_SZ   sizeof(dma_addr_t)
 
#define CAAM_DESC_BYTES_MAX   (CAAM_CMD_SZ * MAX_CAAM_DESCSIZE)
 
#define PRINT_POS
 
#define SET_OK_NO_PROP_ERRORS
 
#define DISABLE_AUTO_INFO_FIFO
 
#define ENABLE_AUTO_INFO_FIFO
 
#define APPEND_CMD(cmd, op)
 
#define APPEND_CMD_LEN(cmd, op)
 
#define APPEND_CMD_PTR(cmd, op)
 
#define APPEND_SEQ_PTR_INTLEN(cmd, op)
 
#define APPEND_CMD_PTR_TO_IMM(cmd, op)
 
#define APPEND_CMD_PTR_EXTLEN(cmd, op)
 
#define APPEND_CMD_PTR_LEN(cmd, op, type)
 
#define APPEND_CMD_PTR_TO_IMM2(cmd, op)
 
#define APPEND_CMD_RAW_IMM(cmd, op, type)
 
#define APPEND_MATH(op, desc, dest, src_0, src_1, len)
 
#define append_math_add(desc, dest, src0, src1, len)   APPEND_MATH(ADD, desc, dest, src0, src1, len)
 
#define append_math_sub(desc, dest, src0, src1, len)   APPEND_MATH(SUB, desc, dest, src0, src1, len)
 
#define append_math_add_c(desc, dest, src0, src1, len)   APPEND_MATH(ADDC, desc, dest, src0, src1, len)
 
#define append_math_sub_b(desc, dest, src0, src1, len)   APPEND_MATH(SUBB, desc, dest, src0, src1, len)
 
#define append_math_and(desc, dest, src0, src1, len)   APPEND_MATH(AND, desc, dest, src0, src1, len)
 
#define append_math_or(desc, dest, src0, src1, len)   APPEND_MATH(OR, desc, dest, src0, src1, len)
 
#define append_math_xor(desc, dest, src0, src1, len)   APPEND_MATH(XOR, desc, dest, src0, src1, len)
 
#define append_math_lshift(desc, dest, src0, src1, len)   APPEND_MATH(LSHIFT, desc, dest, src0, src1, len)
 
#define append_math_rshift(desc, dest, src0, src1, len)   APPEND_MATH(RSHIFT, desc, dest, src0, src1, len)
 
#define APPEND_MATH_IMM_u32(op, desc, dest, src_0, src_1, data)
 
#define append_math_add_imm_u32(desc, dest, src0, src1, data)   APPEND_MATH_IMM_u32(ADD, desc, dest, src0, src1, data)
 
#define append_math_sub_imm_u32(desc, dest, src0, src1, data)   APPEND_MATH_IMM_u32(SUB, desc, dest, src0, src1, data)
 
#define append_math_add_c_imm_u32(desc, dest, src0, src1, data)   APPEND_MATH_IMM_u32(ADDC, desc, dest, src0, src1, data)
 
#define append_math_sub_b_imm_u32(desc, dest, src0, src1, data)   APPEND_MATH_IMM_u32(SUBB, desc, dest, src0, src1, data)
 
#define append_math_and_imm_u32(desc, dest, src0, src1, data)   APPEND_MATH_IMM_u32(AND, desc, dest, src0, src1, data)
 
#define append_math_or_imm_u32(desc, dest, src0, src1, data)   APPEND_MATH_IMM_u32(OR, desc, dest, src0, src1, data)
 
#define append_math_xor_imm_u32(desc, dest, src0, src1, data)   APPEND_MATH_IMM_u32(XOR, desc, dest, src0, src1, data)
 
#define append_math_lshift_imm_u32(desc, dest, src0, src1, data)   APPEND_MATH_IMM_u32(LSHIFT, desc, dest, src0, src1, data)
 
#define append_math_rshift_imm_u32(desc, dest, src0, src1, data)   APPEND_MATH_IMM_u32(RSHIFT, desc, dest, src0, src1, data)
 

Functions

 APPEND_CMD_PTR_TO_IMM (load, LOAD)
 
 APPEND_CMD_PTR_TO_IMM (fifo_load, FIFO_LOAD)
 
 APPEND_CMD_PTR_TO_IMM2 (key, KEY)
 
 APPEND_CMD_RAW_IMM (load, LOAD, u32)
 

Macro Definition Documentation

#define APPEND_CMD (   cmd,
  op 
)
Value:
static inline void append_##cmd(u32 *desc, u32 options) \
{ \
PRINT_POS; \
append_cmd(desc, CMD_##op | options); \
}

Definition at line 151 of file desc_constr.h.

#define APPEND_CMD_LEN (   cmd,
  op 
)
Value:
static inline void append_##cmd(u32 *desc, unsigned int len, u32 options) \
{ \
PRINT_POS; \
append_cmd(desc, CMD_##op | len | options); \
}

Definition at line 160 of file desc_constr.h.

#define APPEND_CMD_PTR (   cmd,
  op 
)
Value:
static inline void append_##cmd(u32 *desc, dma_addr_t ptr, unsigned int len, \
{ \
PRINT_POS; \
append_cmd_ptr(desc, ptr, len, CMD_##op | options); \
}

Definition at line 170 of file desc_constr.h.

#define APPEND_CMD_PTR_EXTLEN (   cmd,
  op 
)
Value:
static inline void append_##cmd##_extlen(u32 *desc, dma_addr_t ptr, \
unsigned int len, u32 options) \
{ \
PRINT_POS; \
append_cmd_ptr_extlen(desc, ptr, len, CMD_##op | SQIN_EXT | options); \
}

Definition at line 204 of file desc_constr.h.

#define APPEND_CMD_PTR_LEN (   cmd,
  op,
  type 
)
Value:
static inline void append_##cmd(u32 *desc, dma_addr_t ptr, \
type len, u32 options) \
{ \
PRINT_POS; \
if (sizeof(type) > sizeof(u16)) \
append_##cmd##_extlen(desc, ptr, len, options); \
else \
append_##cmd##_intlen(desc, ptr, len, options); \
}

Definition at line 218 of file desc_constr.h.

#define APPEND_CMD_PTR_TO_IMM (   cmd,
  op 
)
Value:
static inline void append_##cmd##_as_imm(u32 *desc, void *data, \
unsigned int len, u32 options) \
{ \
PRINT_POS; \
append_cmd_data(desc, data, len, CMD_##op | options); \
}

Definition at line 194 of file desc_constr.h.

#define APPEND_CMD_PTR_TO_IMM2 (   cmd,
  op 
)
Value:
static inline void append_##cmd##_as_imm(u32 *desc, void *data, \
unsigned int data_len, \
unsigned int len, u32 options) \
{ \
PRINT_POS; \
append_cmd(desc, CMD_##op | IMMEDIATE | len | options); \
append_data(desc, data, data_len); \
}

Definition at line 235 of file desc_constr.h.

#define APPEND_CMD_RAW_IMM (   cmd,
  op,
  type 
)
Value:
static inline void append_##cmd##_imm_##type(u32 *desc, type immediate, \
{ \
PRINT_POS; \
append_cmd(desc, CMD_##op | IMMEDIATE | options | sizeof(type)); \
append_cmd(desc, immediate); \
}

Definition at line 246 of file desc_constr.h.

#define APPEND_MATH (   op,
  desc,
  dest,
  src_0,
  src_1,
  len 
)
Value:
append_cmd(desc, CMD_MATH | MATH_FUN_##op | MATH_DEST_##dest | \
MATH_SRC0_##src_0 | MATH_SRC1_##src_1 | (u32) (len & MATH_LEN_MASK));

Definition at line 260 of file desc_constr.h.

#define append_math_add (   desc,
  dest,
  src0,
  src1,
  len 
)    APPEND_MATH(ADD, desc, dest, src0, src1, len)

Definition at line 264 of file desc_constr.h.

#define append_math_add_c (   desc,
  dest,
  src0,
  src1,
  len 
)    APPEND_MATH(ADDC, desc, dest, src0, src1, len)

Definition at line 268 of file desc_constr.h.

#define append_math_add_c_imm_u32 (   desc,
  dest,
  src0,
  src1,
  data 
)    APPEND_MATH_IMM_u32(ADDC, desc, dest, src0, src1, data)

Definition at line 294 of file desc_constr.h.

#define append_math_add_imm_u32 (   desc,
  dest,
  src0,
  src1,
  data 
)    APPEND_MATH_IMM_u32(ADD, desc, dest, src0, src1, data)

Definition at line 290 of file desc_constr.h.

#define append_math_and (   desc,
  dest,
  src0,
  src1,
  len 
)    APPEND_MATH(AND, desc, dest, src0, src1, len)

Definition at line 272 of file desc_constr.h.

#define append_math_and_imm_u32 (   desc,
  dest,
  src0,
  src1,
  data 
)    APPEND_MATH_IMM_u32(AND, desc, dest, src0, src1, data)

Definition at line 298 of file desc_constr.h.

#define APPEND_MATH_IMM_u32 (   op,
  desc,
  dest,
  src_0,
  src_1,
  data 
)
Value:
do { \
APPEND_MATH(op, desc, dest, src_0, src_1, CAAM_CMD_SZ); \
append_cmd(desc, data); \
} while (0);

Definition at line 284 of file desc_constr.h.

#define append_math_lshift (   desc,
  dest,
  src0,
  src1,
  len 
)    APPEND_MATH(LSHIFT, desc, dest, src0, src1, len)

Definition at line 278 of file desc_constr.h.

#define append_math_lshift_imm_u32 (   desc,
  dest,
  src0,
  src1,
  data 
)    APPEND_MATH_IMM_u32(LSHIFT, desc, dest, src0, src1, data)

Definition at line 304 of file desc_constr.h.

#define append_math_or (   desc,
  dest,
  src0,
  src1,
  len 
)    APPEND_MATH(OR, desc, dest, src0, src1, len)

Definition at line 274 of file desc_constr.h.

#define append_math_or_imm_u32 (   desc,
  dest,
  src0,
  src1,
  data 
)    APPEND_MATH_IMM_u32(OR, desc, dest, src0, src1, data)

Definition at line 300 of file desc_constr.h.

#define append_math_rshift (   desc,
  dest,
  src0,
  src1,
  len 
)    APPEND_MATH(RSHIFT, desc, dest, src0, src1, len)

Definition at line 280 of file desc_constr.h.

#define append_math_rshift_imm_u32 (   desc,
  dest,
  src0,
  src1,
  data 
)    APPEND_MATH_IMM_u32(RSHIFT, desc, dest, src0, src1, data)

Definition at line 306 of file desc_constr.h.

#define append_math_sub (   desc,
  dest,
  src0,
  src1,
  len 
)    APPEND_MATH(SUB, desc, dest, src0, src1, len)

Definition at line 266 of file desc_constr.h.

#define append_math_sub_b (   desc,
  dest,
  src0,
  src1,
  len 
)    APPEND_MATH(SUBB, desc, dest, src0, src1, len)

Definition at line 270 of file desc_constr.h.

#define append_math_sub_b_imm_u32 (   desc,
  dest,
  src0,
  src1,
  data 
)    APPEND_MATH_IMM_u32(SUBB, desc, dest, src0, src1, data)

Definition at line 296 of file desc_constr.h.

#define append_math_sub_imm_u32 (   desc,
  dest,
  src0,
  src1,
  data 
)    APPEND_MATH_IMM_u32(SUB, desc, dest, src0, src1, data)

Definition at line 292 of file desc_constr.h.

#define append_math_xor (   desc,
  dest,
  src0,
  src1,
  len 
)    APPEND_MATH(XOR, desc, dest, src0, src1, len)

Definition at line 276 of file desc_constr.h.

#define append_math_xor_imm_u32 (   desc,
  dest,
  src0,
  src1,
  data 
)    APPEND_MATH_IMM_u32(XOR, desc, dest, src0, src1, data)

Definition at line 302 of file desc_constr.h.

#define APPEND_SEQ_PTR_INTLEN (   cmd,
  op 
)
Value:
static inline void append_seq_##cmd##_ptr_intlen(u32 *desc, dma_addr_t ptr, \
unsigned int len, \
{ \
PRINT_POS; \
append_cmd_ptr(desc, ptr, len, CMD_SEQ_##op##_PTR | options); \
}

Definition at line 183 of file desc_constr.h.

#define CAAM_CMD_SZ   sizeof(u32)

Definition at line 10 of file desc_constr.h.

#define CAAM_DESC_BYTES_MAX   (CAAM_CMD_SZ * MAX_CAAM_DESCSIZE)

Definition at line 12 of file desc_constr.h.

#define CAAM_PTR_SZ   sizeof(dma_addr_t)

Definition at line 11 of file desc_constr.h.

#define DISABLE_AUTO_INFO_FIFO
Value:
LDST_SRCDST_WORD_DECOCTRL | \

Definition at line 25 of file desc_constr.h.

#define ENABLE_AUTO_INFO_FIFO
Value:
LDST_SRCDST_WORD_DECOCTRL | \

Definition at line 28 of file desc_constr.h.

#define IMMEDIATE   (1 << 23)

Definition at line 9 of file desc_constr.h.

#define PRINT_POS

Definition at line 18 of file desc_constr.h.

#define SET_OK_NO_PROP_ERRORS
Value:
LDST_SRCDST_WORD_DECOCTRL | \
LDST_OFFSET_SHIFT))

Definition at line 21 of file desc_constr.h.

Function Documentation

APPEND_CMD_PTR_TO_IMM ( load  ,
LOAD   
)
APPEND_CMD_PTR_TO_IMM ( fifo_load  ,
FIFO_LOAD   
)
APPEND_CMD_PTR_TO_IMM2 ( key  ,
KEY   
)
APPEND_CMD_RAW_IMM ( load  ,
LOAD  ,
u32   
)