1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (c) 2019 HiSilicon Limited. */
7 #define pr_fmt(fmt) "hisi_zip: " fmt
9 #include <linux/list.h>
10 #include <linux/hisi_acc_qm.h>
12 enum hisi_zip_error_type {
13 /* negative compression */
20 atomic64_t send_busy_cnt;
21 atomic64_t err_bd_cnt;
28 struct hisi_zip_ctrl *ctrl;
29 struct hisi_zip_dfx dfx;
41 u32 input_data_length;
45 * in_sge_data_offset: 0~23 bits
47 * sqe_type: 29~31 bits
51 * out_sge_data_offset: 0~23 bits
56 * request_type: 0~7 bits
57 * buffer_type: 8~11 bits
64 /* tag: in sqe type 0 */
78 /* tag: in sqe type 3 */
84 enum zip_cap_table_type {
93 ZIP_DRV_ALG_BITMAP_TB,
102 int zip_create_qps(struct hisi_qp **qps, int qp_num, int node);
103 int hisi_zip_register_to_crypto(struct hisi_qm *qm);
104 void hisi_zip_unregister_from_crypto(struct hisi_qm *qm);
105 bool hisi_zip_alg_support(struct hisi_qm *qm, u32 alg);