1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (c) 2019 HiSilicon Limited. */
6 #include <linux/list.h>
9 #define HPRE_SQE_SIZE sizeof(struct hpre_sqe)
10 #define HPRE_PF_DEF_Q_NUM 64
11 #define HPRE_PF_DEF_Q_BASE 0
21 enum hpre_ctrl_dbgfs_file {
28 enum hpre_dfx_dbgfs_file {
39 #define HPRE_DEBUGFS_FILE_NUM (HPRE_DEBUG_FILE_NUM + HPRE_CLUSTERS_NUM - 1)
41 struct hpre_debugfs_file {
43 enum hpre_ctrl_dbgfs_file type;
45 struct hpre_debug *debug;
50 enum hpre_dfx_dbgfs_file type;
54 * One HPRE controller has one PF and multiple VFs, some global configurations
55 * which PF has need this structure.
56 * Just relevant for PF.
59 struct hpre_dfx dfx[HPRE_DFX_FILE_NUM];
60 struct hpre_debugfs_file files[HPRE_DEBUGFS_FILE_NUM];
65 struct hpre_debug debug;
70 HPRE_ALG_NC_NCRT = 0x0,
71 HPRE_ALG_NC_CRT = 0x1,
72 HPRE_ALG_KG_STD = 0x2,
73 HPRE_ALG_KG_CRT = 0x3,
89 #define _HPRE_SQE_ALIGN_EXT 7
90 __le32 rsvd1[_HPRE_SQE_ALIGN_EXT];
93 struct hisi_qp *hpre_create_qp(void);
94 int hpre_algs_register(void);
95 void hpre_algs_unregister(void);