Branch data Line data Source code
1 : : /* SPDX-License-Identifier: BSD-3-Clause 2 : : * Copyright(C) 2021 Marvell. 3 : : */ 4 : : 5 : : #ifndef _ROC_CPT_PRIV_H_ 6 : : #define _ROC_CPT_PRIV_H_ 7 : : 8 : : struct cpt { 9 : : struct plt_pci_device *pci_dev; 10 : : struct dev dev; 11 : : uint16_t lf_msix_off[ROC_CPT_MAX_LFS]; 12 : : uint8_t lf_blkaddr[ROC_CPT_MAX_LFS]; 13 : : } __plt_cache_aligned; 14 : : 15 : : static inline struct cpt * 16 : : roc_cpt_to_cpt_priv(struct roc_cpt *roc_cpt) 17 : : { 18 : 0 : return (struct cpt *)&roc_cpt->reserved[0]; 19 : : } 20 : : 21 : : int cpt_lfs_attach(struct dev *dev, uint8_t blkaddr, bool modify, 22 : : uint16_t nb_lf); 23 : : int cpt_lfs_detach(struct dev *dev); 24 : : int cpt_lfs_alloc(struct dev *dev, uint8_t eng_grpmsk, uint8_t blk, bool inl_dev_sso, 25 : : bool ctx_ilen_valid, uint8_t ctx_ilen, bool rxc_ena, uint16_t rx_inject_qp); 26 : : int cpt_lfs_free(struct dev *dev); 27 : : int cpt_lf_init(struct roc_cpt_lf *lf); 28 : : void cpt_lf_fini(struct roc_cpt_lf *lf); 29 : : 30 : : int cpt_lf_outb_cfg(struct dev *dev, uint16_t sso_pf_func, uint16_t nix_pf_func, 31 : : uint8_t lf_id, bool ena); 32 : : int cpt_get_msix_offset(struct dev *dev, struct msix_offset_rsp **msix_rsp); 33 : : uint64_t cpt_get_blkaddr(struct dev *dev); 34 : : void cpt_lf_print(struct roc_cpt_lf *lf); 35 : : 36 : : #endif /* _ROC_CPT_PRIV_H_ */