1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2021 Marvell.
5 #ifndef _ROC_CPT_PRIV_H_
6 #define _ROC_CPT_PRIV_H_
9 struct plt_pci_device *pci_dev;
11 uint16_t lf_msix_off[ROC_CPT_MAX_LFS];
12 uint8_t lf_blkaddr[ROC_CPT_MAX_LFS];
13 } __plt_cache_aligned;
15 static inline struct cpt *
16 roc_cpt_to_cpt_priv(struct roc_cpt *roc_cpt)
18 return (struct cpt *)&roc_cpt->reserved[0];
21 int cpt_lfs_attach(struct dev *dev, uint8_t blkaddr, bool modify,
23 int cpt_lfs_detach(struct dev *dev);
24 int cpt_lfs_alloc(struct dev *dev, uint8_t eng_grpmsk, uint8_t blk,
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);
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);
36 #endif /* _ROC_CPT_PRIV_H_ */