Lines Matching refs:sqe

101 	void (*fill_addr)(struct hisi_zip_sqe *sqe, struct hisi_zip_req *req);
102 void (*fill_buf_size)(struct hisi_zip_sqe *sqe, struct hisi_zip_req *req);
103 void (*fill_buf_type)(struct hisi_zip_sqe *sqe, u8 buf_type);
104 void (*fill_req_type)(struct hisi_zip_sqe *sqe, u8 req_type);
105 void (*fill_tag)(struct hisi_zip_sqe *sqe, struct hisi_zip_req *req);
106 void (*fill_sqe_type)(struct hisi_zip_sqe *sqe, u8 sqe_type);
107 u32 (*get_tag)(struct hisi_zip_sqe *sqe);
108 u32 (*get_status)(struct hisi_zip_sqe *sqe);
109 u32 (*get_dstlen)(struct hisi_zip_sqe *sqe);
263 static void hisi_zip_fill_addr(struct hisi_zip_sqe *sqe, struct hisi_zip_req *req) in hisi_zip_fill_addr() argument
265 sqe->source_addr_l = lower_32_bits(req->dma_src); in hisi_zip_fill_addr()
266 sqe->source_addr_h = upper_32_bits(req->dma_src); in hisi_zip_fill_addr()
267 sqe->dest_addr_l = lower_32_bits(req->dma_dst); in hisi_zip_fill_addr()
268 sqe->dest_addr_h = upper_32_bits(req->dma_dst); in hisi_zip_fill_addr()
271 static void hisi_zip_fill_buf_size(struct hisi_zip_sqe *sqe, struct hisi_zip_req *req) in hisi_zip_fill_buf_size() argument
275 sqe->input_data_length = a_req->slen - req->sskip; in hisi_zip_fill_buf_size()
276 sqe->dest_avail_out = a_req->dlen - req->dskip; in hisi_zip_fill_buf_size()
277 sqe->dw7 = FIELD_PREP(HZIP_IN_SGE_DATA_OFFSET_M, req->sskip); in hisi_zip_fill_buf_size()
278 sqe->dw8 = FIELD_PREP(HZIP_OUT_SGE_DATA_OFFSET_M, req->dskip); in hisi_zip_fill_buf_size()
281 static void hisi_zip_fill_buf_type(struct hisi_zip_sqe *sqe, u8 buf_type) in hisi_zip_fill_buf_type() argument
285 val = sqe->dw9 & ~HZIP_BUF_TYPE_M; in hisi_zip_fill_buf_type()
287 sqe->dw9 = val; in hisi_zip_fill_buf_type()
290 static void hisi_zip_fill_req_type(struct hisi_zip_sqe *sqe, u8 req_type) in hisi_zip_fill_req_type() argument
294 val = sqe->dw9 & ~HZIP_REQ_TYPE_M; in hisi_zip_fill_req_type()
296 sqe->dw9 = val; in hisi_zip_fill_req_type()
299 static void hisi_zip_fill_tag_v1(struct hisi_zip_sqe *sqe, struct hisi_zip_req *req) in hisi_zip_fill_tag_v1() argument
301 sqe->dw13 = req->req_id; in hisi_zip_fill_tag_v1()
304 static void hisi_zip_fill_tag_v2(struct hisi_zip_sqe *sqe, struct hisi_zip_req *req) in hisi_zip_fill_tag_v2() argument
306 sqe->dw26 = req->req_id; in hisi_zip_fill_tag_v2()
309 static void hisi_zip_fill_sqe_type(struct hisi_zip_sqe *sqe, u8 sqe_type) in hisi_zip_fill_sqe_type() argument
313 val = sqe->dw7 & ~HZIP_SQE_TYPE_M; in hisi_zip_fill_sqe_type()
315 sqe->dw7 = val; in hisi_zip_fill_sqe_type()
318 static void hisi_zip_fill_sqe(struct hisi_zip_ctx *ctx, struct hisi_zip_sqe *sqe, in hisi_zip_fill_sqe() argument
323 memset(sqe, 0, sizeof(struct hisi_zip_sqe)); in hisi_zip_fill_sqe()
325 ops->fill_addr(sqe, req); in hisi_zip_fill_sqe()
326 ops->fill_buf_size(sqe, req); in hisi_zip_fill_sqe()
327 ops->fill_buf_type(sqe, HZIP_SGL); in hisi_zip_fill_sqe()
328 ops->fill_req_type(sqe, req_type); in hisi_zip_fill_sqe()
329 ops->fill_tag(sqe, req); in hisi_zip_fill_sqe()
330 ops->fill_sqe_type(sqe, ops->sqe_type); in hisi_zip_fill_sqe()
386 static u32 hisi_zip_get_tag_v1(struct hisi_zip_sqe *sqe) in hisi_zip_get_tag_v1() argument
388 return sqe->dw13; in hisi_zip_get_tag_v1()
391 static u32 hisi_zip_get_tag_v2(struct hisi_zip_sqe *sqe) in hisi_zip_get_tag_v2() argument
393 return sqe->dw26; in hisi_zip_get_tag_v2()
396 static u32 hisi_zip_get_status(struct hisi_zip_sqe *sqe) in hisi_zip_get_status() argument
398 return sqe->dw3 & HZIP_BD_STATUS_M; in hisi_zip_get_status()
401 static u32 hisi_zip_get_dstlen(struct hisi_zip_sqe *sqe) in hisi_zip_get_dstlen() argument
403 return sqe->produced; in hisi_zip_get_dstlen()
413 struct hisi_zip_sqe *sqe = data; in hisi_zip_acomp_cb() local
414 u32 tag = ops->get_tag(sqe); in hisi_zip_acomp_cb()
421 status = ops->get_status(sqe); in hisi_zip_acomp_cb()
425 sqe->produced); in hisi_zip_acomp_cb()
430 dlen = ops->get_dstlen(sqe); in hisi_zip_acomp_cb()