GNU Linux-libre 5.16.19-gnu
[releases.git] / drivers / crypto / marvell / octeontx2 / cn10k_cpt.h
1 /* SPDX-License-Identifier: GPL-2.0-only
2  * Copyright (C) 2021 Marvell.
3  */
4 #ifndef __CN10K_CPT_H
5 #define __CN10K_CPT_H
6
7 #include "otx2_cpt_common.h"
8 #include "otx2_cptpf.h"
9 #include "otx2_cptvf.h"
10
11 static inline u8 cn10k_cpt_get_compcode(union otx2_cpt_res_s *result)
12 {
13         return ((struct cn10k_cpt_res_s *)result)->compcode;
14 }
15
16 static inline u8 cn10k_cpt_get_uc_compcode(union otx2_cpt_res_s *result)
17 {
18         return ((struct cn10k_cpt_res_s *)result)->uc_compcode;
19 }
20
21 static inline u8 otx2_cpt_get_compcode(union otx2_cpt_res_s *result)
22 {
23         return ((struct cn9k_cpt_res_s *)result)->compcode;
24 }
25
26 static inline u8 otx2_cpt_get_uc_compcode(union otx2_cpt_res_s *result)
27 {
28         return ((struct cn9k_cpt_res_s *)result)->uc_compcode;
29 }
30
31 void cn10k_cpt_send_cmd(union otx2_cpt_inst_s *cptinst, u32 insts_num,
32                         struct otx2_cptlf_info *lf);
33 int cn10k_cptpf_lmtst_init(struct otx2_cptpf_dev *cptpf);
34 int cn10k_cptvf_lmtst_init(struct otx2_cptvf_dev *cptvf);
35
36 #endif /* __CN10K_CPTLF_H */