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 int cn10k_cptpf_lmtst_init(struct otx2_cptpf_dev *cptpf);
32 int cn10k_cptvf_lmtst_init(struct otx2_cptvf_dev *cptvf);
33 
34 #endif /* __CN10K_CPTLF_H */
35