• Home
  • Raw
  • Download

Lines Matching refs:desc

20 #define PRINT_POS do { printf("%02d: %s\n", desc_len(desc),\
68 static inline int desc_len(u32 *desc) in desc_len() argument
70 return *desc & HDR_DESCLEN_MASK; in desc_len()
73 static inline int desc_bytes(void *desc) in desc_bytes() argument
75 return desc_len(desc) * CAAM_CMD_SZ; in desc_bytes()
78 static inline u32 *desc_end(u32 *desc) in desc_end() argument
80 return desc + desc_len(desc); in desc_end()
83 static inline void *desc_pdb(u32 *desc) in desc_pdb() argument
85 return desc + 1; in desc_pdb()
88 static inline void init_desc(u32 *desc, u32 options) in init_desc() argument
90 *desc = (options | HDR_ONE) + 1; in init_desc()
93 static inline void init_job_desc(u32 *desc, u32 options) in init_job_desc() argument
95 init_desc(desc, CMD_DESC_HDR | options); in init_job_desc()
98 static inline void init_job_desc_pdb(u32 *desc, u32 options, size_t pdb_bytes) in init_job_desc_pdb() argument
102 init_job_desc(desc, in init_job_desc_pdb()
107 static inline void append_ptr(u32 *desc, dma_addr_t ptr) in append_ptr() argument
109 dma_addr_t *offset = (dma_addr_t *)desc_end(desc); in append_ptr()
121 (*desc) += CAAM_PTR_SZ / CAAM_CMD_SZ; in append_ptr()
124 static inline void append_data(u32 *desc, void *data, int len) in append_data() argument
126 u32 *offset = desc_end(desc); in append_data()
131 (*desc) += (len + CAAM_CMD_SZ - 1) / CAAM_CMD_SZ; in append_data()
134 static inline void append_cmd(u32 *desc, u32 command) in append_cmd() argument
136 u32 *cmd = desc_end(desc); in append_cmd()
140 (*desc)++; in append_cmd()
145 static inline void append_u64(u32 *desc, u64 data) in append_u64() argument
147 u32 *offset = desc_end(desc); in append_u64()
152 (*desc) += 2; in append_u64()
156 static inline u32 *write_cmd(u32 *desc, u32 command) in write_cmd() argument
158 *desc = command; in write_cmd()
160 return desc + 1; in write_cmd()
163 static inline void append_cmd_ptr(u32 *desc, dma_addr_t ptr, int len, in append_cmd_ptr() argument
166 append_cmd(desc, command | len); in append_cmd_ptr()
167 append_ptr(desc, ptr); in append_cmd_ptr()
171 static inline void append_cmd_ptr_extlen(u32 *desc, dma_addr_t ptr, in append_cmd_ptr_extlen() argument
174 append_cmd(desc, command); in append_cmd_ptr_extlen()
176 append_ptr(desc, ptr); in append_cmd_ptr_extlen()
177 append_cmd(desc, len); in append_cmd_ptr_extlen()
180 static inline void append_cmd_data(u32 *desc, void *data, int len, in append_cmd_data() argument
183 append_cmd(desc, command | IMMEDIATE | len); in append_cmd_data()
184 append_data(desc, data, len); in append_cmd_data()
188 static inline u32 *append_##cmd(u32 *desc, u32 options) \
190 u32 *cmd = desc_end(desc); \
192 append_cmd(desc, CMD_##op | options); \
198 static inline void set_jump_tgt_here(u32 *desc, u32 *jump_cmd) in APPEND_CMD_RET()
200 *jump_cmd = *jump_cmd | (desc_len(desc) - (jump_cmd - desc)); in APPEND_CMD_RET()
203 static inline void set_move_tgt_here(u32 *desc, u32 *move_cmd) in set_move_tgt_here() argument
206 *move_cmd = *move_cmd | ((desc_len(desc) << (MOVE_OFFSET_SHIFT + 2)) & in set_move_tgt_here()
211 static inline void append_##cmd(u32 *desc, u32 options) \
214 append_cmd(desc, CMD_##op | options); \
219 static inline void append_##cmd(u32 *desc, unsigned int len, u32 options) \ in APPEND_CMD()
222 append_cmd(desc, CMD_##op | len | options); \ in APPEND_CMD()
229 static inline void append_##cmd(u32 *desc, dma_addr_t ptr, unsigned int len, \
233 append_cmd_ptr(desc, ptr, len, CMD_##op | options); \
240 static inline void append_store(u32 *desc, dma_addr_t ptr, unsigned int len,
247 append_cmd(desc, CMD_STORE | options | len);
254 append_ptr(desc, ptr);
258 static inline void append_seq_##cmd##_ptr_intlen(u32 *desc, dma_addr_t ptr, \
264 append_cmd(desc, CMD_SEQ_##op##_PTR | len | options); \
266 append_cmd_ptr(desc, ptr, len, CMD_SEQ_##op##_PTR | options); \
272 static inline void append_##cmd##_as_imm(u32 *desc, void *data, \
276 append_cmd_data(desc, data, len, CMD_##op | options); \
282 static inline void append_##cmd##_extlen(u32 *desc, dma_addr_t ptr, \
286 append_cmd_ptr_extlen(desc, ptr, len, CMD_##op | SQIN_EXT | options); \
296 static inline void append_##cmd(u32 *desc, dma_addr_t ptr, \
301 append_##cmd##_extlen(desc, ptr, len, options); \
303 append_##cmd##_intlen(desc, ptr, len, options); \
313 static inline void append_##cmd##_as_imm(u32 *desc, void *data, \
318 append_cmd(desc, CMD_##op | IMMEDIATE | len | options); \
319 append_data(desc, data, data_len); \
324 static inline void append_##cmd##_imm_##type(u32 *desc, type immediate, \
328 append_cmd(desc, CMD_##op | IMMEDIATE | options | sizeof(type)); \
329 append_cmd(desc, immediate); \