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 #define HPRE_DEBUGFS_FILE_NUM (HPRE_DEBUG_FILE_NUM + HPRE_CLUSTERS_NUM - 1)
30 struct hpre_debugfs_file
{
32 enum hpre_ctrl_dbgfs_file type
;
34 struct hpre_debug
*debug
;
38 * One HPRE controller has one PF and multiple VFs, some global configurations
39 * which PF has need this structure.
40 * Just relevant for PF.
43 struct dentry
*debug_root
;
44 struct hpre_debugfs_file files
[HPRE_DEBUGFS_FILE_NUM
];
49 struct list_head list
;
50 struct hpre_debug debug
;
56 HPRE_ALG_NC_NCRT
= 0x0,
57 HPRE_ALG_NC_CRT
= 0x1,
58 HPRE_ALG_KG_STD
= 0x2,
59 HPRE_ALG_KG_CRT
= 0x3,
75 #define _HPRE_SQE_ALIGN_EXT 7
76 __le32 rsvd1
[_HPRE_SQE_ALIGN_EXT
];
79 struct hpre
*hpre_find_device(int node
);
80 int hpre_algs_register(void);
81 void hpre_algs_unregister(void);