]>
git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - drivers/net/ethernet/netronome/nfp/nfpcore/nfp.h
778bd9424d5d474f92a2a671d35eb93cc056fd27
2 * Copyright (C) 2015-2017 Netronome Systems, Inc.
4 * This software is dual licensed under the GNU General License Version 2,
5 * June 1991 as shown in the file COPYING in the top-level directory of this
6 * source tree or the BSD 2-Clause License provided below. You have the
7 * option to license this software under the complete terms of either license.
9 * The BSD 2-Clause License:
11 * Redistribution and use in source and binary forms, with or
12 * without modification, are permitted provided that the following
15 * 1. Redistributions of source code must retain the above
16 * copyright notice, this list of conditions and the following
19 * 2. Redistributions in binary form must reproduce the above
20 * copyright notice, this list of conditions and the following
21 * disclaimer in the documentation and/or other materials
22 * provided with the distribution.
24 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
28 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
29 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
30 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
36 * Interface for NFP device access and query functions.
42 #include <linux/device.h>
43 #include <linux/types.h>
47 /* Implemented in nfp_hwinfo.c */
49 const char *nfp_hwinfo_lookup(struct nfp_cpp
*cpp
, const char *lookup
);
51 /* Implemented in nfp_nsp.c, low level functions */
55 int nfp_nsp_read_eth_table(struct nfp_nsp
*state
, void *buf
, unsigned int size
);
56 int nfp_nsp_write_eth_table(struct nfp_nsp
*state
,
57 const void *buf
, unsigned int size
);
59 /* Implemented in nfp_resource.c */
61 /* All keys are CRC32-POSIX of the 8-byte identification string */
63 /* ARM/PCI vNIC Interfaces 0..3 */
64 #define NFP_RESOURCE_VNIC_PCI_0 "vnic.p0"
65 #define NFP_RESOURCE_VNIC_PCI_1 "vnic.p1"
66 #define NFP_RESOURCE_VNIC_PCI_2 "vnic.p2"
67 #define NFP_RESOURCE_VNIC_PCI_3 "vnic.p3"
69 /* NFP Hardware Info Database */
70 #define NFP_RESOURCE_NFP_HWINFO "nfp.info"
72 /* Service Processor */
73 #define NFP_RESOURCE_NSP "nfp.sp"
74 #define NFP_RESOURCE_NSP_DIAG "arm.diag"
76 /* Netronone Flow Firmware Table */
77 #define NFP_RESOURCE_NFP_NFFW "nfp.nffw"
79 /* MAC Statistics Accumulator */
80 #define NFP_RESOURCE_MAC_STATISTICS "mac.stat"
83 nfp_resource_acquire(struct nfp_cpp
*cpp
, const char *name
);
85 void nfp_resource_release(struct nfp_resource
*res
);
87 u32
nfp_resource_cpp_id(struct nfp_resource
*res
);
89 const char *nfp_resource_name(struct nfp_resource
*res
);
91 u64
nfp_resource_address(struct nfp_resource
*res
);
93 u64
nfp_resource_size(struct nfp_resource
*res
);
95 #endif /* !__NFP_H__ */