84e6f1ef2db0e0f1c11d420c08364e560b922d37
[dpdk.git] / drivers / common / cnxk / roc_idev_priv.h
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 idev_cfg {
13         uint16_t sso_pf_func;
14         uint16_t npa_pf_func;
15         struct npa_lf *npa;
16         uint16_t npa_refcnt;
17         uint32_t max_pools;
18         uint16_t lmt_pf_func;
19         uint16_t num_lmtlines;
20         uint64_t lmt_base_addr;
21         struct roc_bphy *bphy;
22         struct roc_cpt *cpt;
23 };
24
25 /* Generic */
26 struct idev_cfg *idev_get_cfg(void);
27 void idev_set_defaults(struct idev_cfg *idev);
28
29 /* idev npa */
30 uint16_t idev_npa_pffunc_get(void);
31 struct npa_lf *idev_npa_obj_get(void);
32 uint32_t idev_npa_maxpools_get(void);
33 void idev_npa_maxpools_set(uint32_t max_pools);
34 uint16_t idev_npa_lf_active(struct dev *dev);
35
36 /* idev sso */
37 void idev_sso_pffunc_set(uint16_t sso_pf_func);
38 uint16_t idev_sso_pffunc_get(void);
39
40 /* idev lmt */
41 uint16_t idev_lmt_pffunc_get(void);
42
43 #endif /* _ROC_IDEV_PRIV_H_ */