1 /* Applied Micro X-Gene SoC Ethernet Driver
2  *
3  * Copyright (c) 2015, Applied Micro Circuits Corporation
4  * Author: Iyappan Subramanian <isubramanian@apm.com>
5  *
6  * This program is free software; you can redistribute  it and/or modify it
7  * under  the terms of  the GNU General  Public License as published by the
8  * Free Software Foundation;  either version 2 of the  License, or (at your
9  * option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef __XGENE_ENET_RING2_H__
21 #define __XGENE_ENET_RING2_H__
22 
23 #include "xgene_enet_main.h"
24 
25 #define X2_NUM_RING_CONFIG	6
26 
27 #define INTR_MBOX_SIZE		1024
28 #define CSR_VMID0_INTR_MBOX	0x0270
29 #define INTR_CLEAR		BIT(23)
30 
31 #define X2_MSG_AM_POS		10
32 #define X2_QBASE_AM_POS		11
33 #define X2_INTLINE_POS		24
34 #define X2_INTLINE_LEN		5
35 #define X2_CFGCRID_POS		29
36 #define X2_CFGCRID_LEN		3
37 #define X2_SELTHRSH_POS		7
38 #define X2_SELTHRSH_LEN		3
39 #define X2_RINGTYPE_POS		23
40 #define X2_RINGTYPE_LEN		2
41 #define X2_DEQINTEN_POS		29
42 #define X2_RECOMTIMEOUT_POS	0
43 #define X2_RECOMTIMEOUT_LEN	7
44 #define X2_NUMMSGSINQ_POS	0
45 #define X2_NUMMSGSINQ_LEN	17
46 
47 extern struct xgene_ring_ops xgene_ring2_ops;
48 
49 #endif /* __XGENE_ENET_RING2_H__ */
50