cn10k_cpt.h 869 B

12345678910111213141516171819202122232425262728293031323334
  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. #include "otx2_cpt_common.h"
  7. #include "otx2_cptpf.h"
  8. #include "otx2_cptvf.h"
  9. static inline u8 cn10k_cpt_get_compcode(union otx2_cpt_res_s *result)
  10. {
  11. return ((struct cn10k_cpt_res_s *)result)->compcode;
  12. }
  13. static inline u8 cn10k_cpt_get_uc_compcode(union otx2_cpt_res_s *result)
  14. {
  15. return ((struct cn10k_cpt_res_s *)result)->uc_compcode;
  16. }
  17. static inline u8 otx2_cpt_get_compcode(union otx2_cpt_res_s *result)
  18. {
  19. return ((struct cn9k_cpt_res_s *)result)->compcode;
  20. }
  21. static inline u8 otx2_cpt_get_uc_compcode(union otx2_cpt_res_s *result)
  22. {
  23. return ((struct cn9k_cpt_res_s *)result)->uc_compcode;
  24. }
  25. int cn10k_cptpf_lmtst_init(struct otx2_cptpf_dev *cptpf);
  26. int cn10k_cptvf_lmtst_init(struct otx2_cptvf_dev *cptvf);
  27. #endif /* __CN10K_CPTLF_H */