Lines Matching refs:sqe

97 	void (*fill_addr)(struct hisi_zip_sqe *sqe, struct hisi_zip_req *req);
98 void (*fill_buf_size)(struct hisi_zip_sqe *sqe, struct hisi_zip_req *req);
99 void (*fill_buf_type)(struct hisi_zip_sqe *sqe, u8 buf_type);
100 void (*fill_req_type)(struct hisi_zip_sqe *sqe, u8 req_type);
101 void (*fill_tag)(struct hisi_zip_sqe *sqe, struct hisi_zip_req *req);
102 void (*fill_sqe_type)(struct hisi_zip_sqe *sqe, u8 sqe_type);
103 u32 (*get_tag)(struct hisi_zip_sqe *sqe);
104 u32 (*get_status)(struct hisi_zip_sqe *sqe);
105 u32 (*get_dstlen)(struct hisi_zip_sqe *sqe);
260 static void hisi_zip_fill_addr(struct hisi_zip_sqe *sqe, struct hisi_zip_req *req) in hisi_zip_fill_addr() argument
262 sqe->source_addr_l = lower_32_bits(req->dma_src); in hisi_zip_fill_addr()
263 sqe->source_addr_h = upper_32_bits(req->dma_src); in hisi_zip_fill_addr()
264 sqe->dest_addr_l = lower_32_bits(req->dma_dst); in hisi_zip_fill_addr()
265 sqe->dest_addr_h = upper_32_bits(req->dma_dst); in hisi_zip_fill_addr()
268 static void hisi_zip_fill_buf_size(struct hisi_zip_sqe *sqe, struct hisi_zip_req *req) in hisi_zip_fill_buf_size() argument
272 sqe->input_data_length = a_req->slen - req->sskip; in hisi_zip_fill_buf_size()
273 sqe->dest_avail_out = a_req->dlen - req->dskip; in hisi_zip_fill_buf_size()
274 sqe->dw7 = FIELD_PREP(HZIP_IN_SGE_DATA_OFFSET_M, req->sskip); in hisi_zip_fill_buf_size()
275 sqe->dw8 = FIELD_PREP(HZIP_OUT_SGE_DATA_OFFSET_M, req->dskip); in hisi_zip_fill_buf_size()
278 static void hisi_zip_fill_buf_type(struct hisi_zip_sqe *sqe, u8 buf_type) in hisi_zip_fill_buf_type() argument
282 val = sqe->dw9 & ~HZIP_BUF_TYPE_M; in hisi_zip_fill_buf_type()
284 sqe->dw9 = val; in hisi_zip_fill_buf_type()
287 static void hisi_zip_fill_req_type(struct hisi_zip_sqe *sqe, u8 req_type) in hisi_zip_fill_req_type() argument
291 val = sqe->dw9 & ~HZIP_REQ_TYPE_M; in hisi_zip_fill_req_type()
293 sqe->dw9 = val; in hisi_zip_fill_req_type()
296 static void hisi_zip_fill_tag_v1(struct hisi_zip_sqe *sqe, struct hisi_zip_req *req) in hisi_zip_fill_tag_v1() argument
298 sqe->dw13 = req->req_id; in hisi_zip_fill_tag_v1()
301 static void hisi_zip_fill_tag_v2(struct hisi_zip_sqe *sqe, struct hisi_zip_req *req) in hisi_zip_fill_tag_v2() argument
303 sqe->dw26 = req->req_id; in hisi_zip_fill_tag_v2()
306 static void hisi_zip_fill_sqe_type(struct hisi_zip_sqe *sqe, u8 sqe_type) in hisi_zip_fill_sqe_type() argument
310 val = sqe->dw7 & ~HZIP_SQE_TYPE_M; in hisi_zip_fill_sqe_type()
312 sqe->dw7 = val; in hisi_zip_fill_sqe_type()
315 static void hisi_zip_fill_sqe(struct hisi_zip_ctx *ctx, struct hisi_zip_sqe *sqe, in hisi_zip_fill_sqe() argument
320 memset(sqe, 0, sizeof(struct hisi_zip_sqe)); in hisi_zip_fill_sqe()
322 ops->fill_addr(sqe, req); in hisi_zip_fill_sqe()
323 ops->fill_buf_size(sqe, req); in hisi_zip_fill_sqe()
324 ops->fill_buf_type(sqe, HZIP_SGL); in hisi_zip_fill_sqe()
325 ops->fill_req_type(sqe, req_type); in hisi_zip_fill_sqe()
326 ops->fill_tag(sqe, req); in hisi_zip_fill_sqe()
327 ops->fill_sqe_type(sqe, ops->sqe_type); in hisi_zip_fill_sqe()
383 static u32 hisi_zip_get_tag_v1(struct hisi_zip_sqe *sqe) in hisi_zip_get_tag_v1() argument
385 return sqe->dw13; in hisi_zip_get_tag_v1()
388 static u32 hisi_zip_get_tag_v2(struct hisi_zip_sqe *sqe) in hisi_zip_get_tag_v2() argument
390 return sqe->dw26; in hisi_zip_get_tag_v2()
393 static u32 hisi_zip_get_status(struct hisi_zip_sqe *sqe) in hisi_zip_get_status() argument
395 return sqe->dw3 & HZIP_BD_STATUS_M; in hisi_zip_get_status()
398 static u32 hisi_zip_get_dstlen(struct hisi_zip_sqe *sqe) in hisi_zip_get_dstlen() argument
400 return sqe->produced; in hisi_zip_get_dstlen()
410 struct hisi_zip_sqe *sqe = data; in hisi_zip_acomp_cb() local
411 u32 tag = ops->get_tag(sqe); in hisi_zip_acomp_cb()
418 status = ops->get_status(sqe); in hisi_zip_acomp_cb()
422 sqe->produced); in hisi_zip_acomp_cb()
427 dlen = ops->get_dstlen(sqe); in hisi_zip_acomp_cb()