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