ce3935d6729b0d16a9d0051860b71207c9f54eec
[linux-2.6-microblaze.git] / drivers / net / ethernet / netronome / nfp / nfp_abi.h
1 /* SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) */
2 /*
3  * Copyright (C) 2018 Netronome Systems, Inc.
4  *
5  * This software is dual licensed under the GNU General License Version 2,
6  * June 1991 as shown in the file COPYING in the top-level directory of this
7  * source tree or the BSD 2-Clause License provided below.  You have the
8  * option to license this software under the complete terms of either license.
9  *
10  * The BSD 2-Clause License:
11  *
12  *     Redistribution and use in source and binary forms, with or
13  *     without modification, are permitted provided that the following
14  *     conditions are met:
15  *
16  *      1. Redistributions of source code must retain the above
17  *         copyright notice, this list of conditions and the following
18  *         disclaimer.
19  *
20  *      2. Redistributions in binary form must reproduce the above
21  *         copyright notice, this list of conditions and the following
22  *         disclaimer in the documentation and/or other materials
23  *         provided with the distribution.
24  *
25  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
28  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
29  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
30  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
31  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32  * SOFTWARE.
33  */
34
35 #ifndef __NFP_ABI__
36 #define __NFP_ABI__ 1
37
38 #include <linux/types.h>
39
40 #define NFP_MBOX_SYM_NAME               "_abi_nfd_pf%u_mbox"
41 #define NFP_MBOX_SYM_MIN_SIZE           16 /* When no data needed */
42
43 #define NFP_MBOX_CMD            0x00
44 #define NFP_MBOX_RET            0x04
45 #define NFP_MBOX_DATA_LEN       0x08
46 #define NFP_MBOX_RESERVED       0x0c
47 #define NFP_MBOX_DATA           0x10
48
49 /**
50  * enum nfp_mbox_cmd - PF mailbox commands
51  *
52  * @NFP_MBOX_NO_CMD:    null command
53  * Used to indicate previous command has finished.
54  */
55 enum nfp_mbox_cmd {
56         NFP_MBOX_NO_CMD                 = 0x00,
57 };
58
59 #endif