1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(C) 2021 Marvell. 3 */ 4 5 #ifndef _ROC_IDEV_PRIV_H_ 6 #define _ROC_IDEV_PRIV_H_ 7 8 /* Intra device related functions */ 9 struct npa_lf; 10 struct roc_bphy; 11 struct roc_cpt; 12 struct nix_inl_dev; 13 struct idev_cfg { 14 uint16_t sso_pf_func; 15 uint16_t npa_pf_func; 16 struct npa_lf *npa; 17 uint16_t npa_refcnt; 18 uint32_t max_pools; 19 uint16_t lmt_pf_func; 20 uint16_t num_lmtlines; 21 uint64_t lmt_base_addr; 22 struct roc_bphy *bphy; 23 struct roc_cpt *cpt; 24 struct roc_sso *sso; 25 struct nix_inl_dev *nix_inl_dev; 26 plt_spinlock_t nix_inl_dev_lock; 27 }; 28 29 /* Generic */ 30 struct idev_cfg *idev_get_cfg(void); 31 void idev_set_defaults(struct idev_cfg *idev); 32 33 /* idev npa */ 34 uint16_t idev_npa_pffunc_get(void); 35 struct npa_lf *idev_npa_obj_get(void); 36 uint32_t idev_npa_maxpools_get(void); 37 void idev_npa_maxpools_set(uint32_t max_pools); 38 uint16_t idev_npa_lf_active(struct dev *dev); 39 40 /* idev sso */ 41 void idev_sso_pffunc_set(uint16_t sso_pf_func); 42 uint16_t idev_sso_pffunc_get(void); 43 struct roc_sso *idev_sso_get(void); 44 void idev_sso_set(struct roc_sso *sso); 45 46 /* idev lmt */ 47 uint16_t idev_lmt_pffunc_get(void); 48 49 #endif /* _ROC_IDEV_PRIV_H_ */ 50