1*9d26e4fcSRobert Mustacchi /*
2*9d26e4fcSRobert Mustacchi  * This file and its contents are supplied under the terms of the
3*9d26e4fcSRobert Mustacchi  * Common Development and Distribution License ("CDDL"), version 1.0.
4*9d26e4fcSRobert Mustacchi  * You may only use this file in accordance with the terms of version
5*9d26e4fcSRobert Mustacchi  * 1.0 of the CDDL.
6*9d26e4fcSRobert Mustacchi  *
7*9d26e4fcSRobert Mustacchi  * A full copy of the text of the CDDL should have accompanied this
8*9d26e4fcSRobert Mustacchi  * source.  A copy of the CDDL is also available via the Internet at
9*9d26e4fcSRobert Mustacchi  * http://www.illumos.org/license/CDDL.
10*9d26e4fcSRobert Mustacchi  */
11*9d26e4fcSRobert Mustacchi 
12*9d26e4fcSRobert Mustacchi /*
13*9d26e4fcSRobert Mustacchi  * Copyright 2016 Joyent, Inc.
14*9d26e4fcSRobert Mustacchi  */
15*9d26e4fcSRobert Mustacchi 
16*9d26e4fcSRobert Mustacchi #ifndef _I40E_XREGS_H
17*9d26e4fcSRobert Mustacchi #define	_I40E_XREGS_H
18*9d26e4fcSRobert Mustacchi 
19*9d26e4fcSRobert Mustacchi /*
20*9d26e4fcSRobert Mustacchi  * This file contains extra register definitions and other things that would
21*9d26e4fcSRobert Mustacchi  * nominally come from the Intel common code, but do not due to bugs, erratum,
22*9d26e4fcSRobert Mustacchi  * etc. Ideally we'll get to a point where we can remove this file.
23*9d26e4fcSRobert Mustacchi  */
24*9d26e4fcSRobert Mustacchi #include "i40e_type.h"
25*9d26e4fcSRobert Mustacchi 
26*9d26e4fcSRobert Mustacchi #ifdef __cplusplus
27*9d26e4fcSRobert Mustacchi extern "C" {
28*9d26e4fcSRobert Mustacchi #endif
29*9d26e4fcSRobert Mustacchi 
30*9d26e4fcSRobert Mustacchi /*
31*9d26e4fcSRobert Mustacchi  * The MSPDC register is missing from the current datasheet.
32*9d26e4fcSRobert Mustacchi  */
33*9d26e4fcSRobert Mustacchi #define	I40E_GLPRT_MSPDC(_i)		(0x00300060 + ((_i) * 8)) /* _i=0...3 */
34*9d26e4fcSRobert Mustacchi #define	I40E_GLPRT_MSDPC_MAX_INDEX	3
35*9d26e4fcSRobert Mustacchi #define	I40E_GLPRT_MSPDC_MSPDC_SHIFT	0
36*9d26e4fcSRobert Mustacchi #define	I40E_GLPRT_MSPDC_MSPDC_MASK	\
37*9d26e4fcSRobert Mustacchi 	I40E_MASK(0xFFFFFFFF, I40E_GLPRT_MSPDC_MSPDC_SHIFT)
38*9d26e4fcSRobert Mustacchi 
39*9d26e4fcSRobert Mustacchi /*
40*9d26e4fcSRobert Mustacchi  * The RXERR* registers are technically correct from the perspective of their
41*9d26e4fcSRobert Mustacchi  * addreses; however, the other associated constants are not correct. Instead,
42*9d26e4fcSRobert Mustacchi  * we have new definitions here in the interim.
43*9d26e4fcSRobert Mustacchi  */
44*9d26e4fcSRobert Mustacchi 
45*9d26e4fcSRobert Mustacchi #define	I40E_X_GL_RXERR1_L(_i)		(0x00318000 + ((_i) * 8))
46*9d26e4fcSRobert Mustacchi 
47*9d26e4fcSRobert Mustacchi #define	I40E_X_GL_RXERR2_L(_i)		(0x0031c000 + ((_i) * 8))
48*9d26e4fcSRobert Mustacchi 
49*9d26e4fcSRobert Mustacchi #ifdef __cplusplus
50*9d26e4fcSRobert Mustacchi }
51*9d26e4fcSRobert Mustacchi #endif
52*9d26e4fcSRobert Mustacchi 
53*9d26e4fcSRobert Mustacchi #endif /* _I40E_XREGS_H */