xref: /dpdk/drivers/net/nfp/nfpcore/nfp_resource.h (revision 8ba461d1eecc02cdf7bf6e3da26ec5cb47c7c42d)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2018 Netronome Systems, Inc.
3  * All rights reserved.
4  */
5 
6 #ifndef __NFP_RESOURCE_H__
7 #define __NFP_RESOURCE_H__
8 
9 #include "nfp_cpp.h"
10 
11 /* Netronone Flow Firmware Table */
12 #define NFP_RESOURCE_NFP_NFFW           "nfp.nffw"
13 
14 /* NFP Hardware Info Database */
15 #define NFP_RESOURCE_NFP_HWINFO         "nfp.info"
16 
17 /* Service Processor */
18 #define NFP_RESOURCE_NSP                "nfp.sp"
19 
20 /* Keepalive */
21 #define NFP_RESOURCE_KEEPALIVE          "nfp.beat"
22 
23 /* Opaque handle to a NFP Resource */
24 struct nfp_resource;
25 
26 struct nfp_resource *nfp_resource_acquire(struct nfp_cpp *cpp,
27 		const char *name);
28 
29 void nfp_resource_release(struct nfp_resource *res);
30 
31 uint32_t nfp_resource_cpp_id(const struct nfp_resource *res);
32 
33 const char *nfp_resource_name(const struct nfp_resource *res);
34 
35 uint64_t nfp_resource_address(const struct nfp_resource *res);
36 
37 uint64_t nfp_resource_size(const struct nfp_resource *res);
38 
39 #endif /* __NFP_RESOURCE_H__ */
40