xref: /linux/drivers/net/ethernet/apm/xgene-v2/ethtool.h (revision 58e16d792a6a8c6b750f637a4649967fcac853dc)
1*1ccea77eSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */
2e05ddafdSIyappan Subramanian /*
3e05ddafdSIyappan Subramanian  * Applied Micro X-Gene SoC Ethernet v2 Driver
4e05ddafdSIyappan Subramanian  *
5e05ddafdSIyappan Subramanian  * Copyright (c) 2017, Applied Micro Circuits Corporation
6e05ddafdSIyappan Subramanian  * Author(s): Iyappan Subramanian <isubramanian@apm.com>
7e05ddafdSIyappan Subramanian  */
8e05ddafdSIyappan Subramanian 
9e05ddafdSIyappan Subramanian #ifndef __XGENE_ENET_V2_ETHTOOL_H__
10e05ddafdSIyappan Subramanian #define __XGENE_ENET_V2_ETHTOOL_H__
11e05ddafdSIyappan Subramanian 
12e05ddafdSIyappan Subramanian struct xge_gstrings_stats {
13e05ddafdSIyappan Subramanian 	char name[ETH_GSTRING_LEN];
14e05ddafdSIyappan Subramanian 	int offset;
15e05ddafdSIyappan Subramanian };
16e05ddafdSIyappan Subramanian 
17e05ddafdSIyappan Subramanian struct xge_gstrings_extd_stats {
18e05ddafdSIyappan Subramanian 	char name[ETH_GSTRING_LEN];
19e05ddafdSIyappan Subramanian 	u32 addr;
20e05ddafdSIyappan Subramanian 	u32 value;
21e05ddafdSIyappan Subramanian };
22e05ddafdSIyappan Subramanian 
23e05ddafdSIyappan Subramanian #define TR64			0xa080
24e05ddafdSIyappan Subramanian #define TR127			0xa084
25e05ddafdSIyappan Subramanian #define TR255			0xa088
26e05ddafdSIyappan Subramanian #define TR511			0xa08c
27e05ddafdSIyappan Subramanian #define TR1K			0xa090
28e05ddafdSIyappan Subramanian #define TRMAX			0xa094
29e05ddafdSIyappan Subramanian #define TRMGV			0xa098
30e05ddafdSIyappan Subramanian #define RFCS			0xa0a4
31e05ddafdSIyappan Subramanian #define RMCA			0xa0a8
32e05ddafdSIyappan Subramanian #define RBCA			0xa0ac
33e05ddafdSIyappan Subramanian #define RXCF			0xa0b0
34e05ddafdSIyappan Subramanian #define RXPF			0xa0b4
35e05ddafdSIyappan Subramanian #define RXUO			0xa0b8
36e05ddafdSIyappan Subramanian #define RALN			0xa0bc
37e05ddafdSIyappan Subramanian #define RFLR			0xa0c0
38e05ddafdSIyappan Subramanian #define RCDE			0xa0c4
39e05ddafdSIyappan Subramanian #define RCSE			0xa0c8
40e05ddafdSIyappan Subramanian #define RUND			0xa0cc
41e05ddafdSIyappan Subramanian #define ROVR			0xa0d0
42e05ddafdSIyappan Subramanian #define RFRG			0xa0d4
43e05ddafdSIyappan Subramanian #define RJBR			0xa0d8
44e05ddafdSIyappan Subramanian #define RDRP			0xa0dc
45e05ddafdSIyappan Subramanian #define TMCA			0xa0e8
46e05ddafdSIyappan Subramanian #define TBCA			0xa0ec
47e05ddafdSIyappan Subramanian #define TXPF			0xa0f0
48e05ddafdSIyappan Subramanian #define TDFR			0xa0f4
49e05ddafdSIyappan Subramanian #define TEDF			0xa0f8
50e05ddafdSIyappan Subramanian #define TSCL			0xa0fc
51e05ddafdSIyappan Subramanian #define TMCL			0xa100
52e05ddafdSIyappan Subramanian #define TLCL			0xa104
53e05ddafdSIyappan Subramanian #define TXCL			0xa108
54e05ddafdSIyappan Subramanian #define TNCL			0xa10c
55e05ddafdSIyappan Subramanian #define TPFH			0xa110
56e05ddafdSIyappan Subramanian #define TDRP			0xa114
57e05ddafdSIyappan Subramanian #define TJBR			0xa118
58e05ddafdSIyappan Subramanian #define TFCS			0xa11c
59e05ddafdSIyappan Subramanian #define TXCF			0xa120
60e05ddafdSIyappan Subramanian #define TOVR			0xa124
61e05ddafdSIyappan Subramanian #define TUND			0xa128
62e05ddafdSIyappan Subramanian #define TFRG			0xa12c
63e05ddafdSIyappan Subramanian 
64e05ddafdSIyappan Subramanian void xge_set_ethtool_ops(struct net_device *ndev);
65e05ddafdSIyappan Subramanian 
66e05ddafdSIyappan Subramanian #endif  /* __XGENE_ENET_V2_ETHTOOL_H__ */
67