common/cnxk: add NPC init and fini
[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 idev_cfg {
11         uint16_t npa_pf_func;
12         struct npa_lf *npa;
13         uint16_t npa_refcnt;
14         uint32_t max_pools;
15         uint16_t lmt_pf_func;
16         uint16_t num_lmtlines;
17         uint64_t lmt_base_addr;
18 };
19
20 /* Generic */
21 struct idev_cfg *idev_get_cfg(void);
22 void idev_set_defaults(struct idev_cfg *idev);
23
24 /* idev npa */
25 uint16_t idev_npa_pffunc_get(void);
26 struct npa_lf *idev_npa_obj_get(void);
27 uint32_t idev_npa_maxpools_get(void);
28 void idev_npa_maxpools_set(uint32_t max_pools);
29 uint16_t idev_npa_lf_active(struct dev *dev);
30
31 /* idev lmt */
32 uint16_t idev_lmt_pffunc_get(void);
33
34 #endif /* _ROC_IDEV_PRIV_H_ */