Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only
0002  * Copyright (C) 2021 Marvell.
0003  */
0004 #ifndef __CN10K_CPT_H
0005 #define __CN10K_CPT_H
0006 
0007 #include "otx2_cpt_common.h"
0008 #include "otx2_cptpf.h"
0009 #include "otx2_cptvf.h"
0010 
0011 static inline u8 cn10k_cpt_get_compcode(union otx2_cpt_res_s *result)
0012 {
0013     return ((struct cn10k_cpt_res_s *)result)->compcode;
0014 }
0015 
0016 static inline u8 cn10k_cpt_get_uc_compcode(union otx2_cpt_res_s *result)
0017 {
0018     return ((struct cn10k_cpt_res_s *)result)->uc_compcode;
0019 }
0020 
0021 static inline u8 otx2_cpt_get_compcode(union otx2_cpt_res_s *result)
0022 {
0023     return ((struct cn9k_cpt_res_s *)result)->compcode;
0024 }
0025 
0026 static inline u8 otx2_cpt_get_uc_compcode(union otx2_cpt_res_s *result)
0027 {
0028     return ((struct cn9k_cpt_res_s *)result)->uc_compcode;
0029 }
0030 
0031 void cn10k_cpt_send_cmd(union otx2_cpt_inst_s *cptinst, u32 insts_num,
0032             struct otx2_cptlf_info *lf);
0033 int cn10k_cptpf_lmtst_init(struct otx2_cptpf_dev *cptpf);
0034 int cn10k_cptvf_lmtst_init(struct otx2_cptvf_dev *cptvf);
0035 
0036 #endif /* __CN10K_CPTLF_H */