Loading...
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * Applied Micro X-Gene SoC Ethernet v2 Driver
4 *
5 * Copyright (c) 2017, Applied Micro Circuits Corporation
6 * Author(s): Iyappan Subramanian <isubramanian@apm.com>
7 */
8
9#ifndef __XGENE_ENET_V2_ETHTOOL_H__
10#define __XGENE_ENET_V2_ETHTOOL_H__
11
12struct xge_gstrings_stats {
13 char name[ETH_GSTRING_LEN];
14 int offset;
15};
16
17struct xge_gstrings_extd_stats {
18 char name[ETH_GSTRING_LEN];
19 u32 addr;
20 u32 value;
21};
22
23#define TR64 0xa080
24#define TR127 0xa084
25#define TR255 0xa088
26#define TR511 0xa08c
27#define TR1K 0xa090
28#define TRMAX 0xa094
29#define TRMGV 0xa098
30#define RFCS 0xa0a4
31#define RMCA 0xa0a8
32#define RBCA 0xa0ac
33#define RXCF 0xa0b0
34#define RXPF 0xa0b4
35#define RXUO 0xa0b8
36#define RALN 0xa0bc
37#define RFLR 0xa0c0
38#define RCDE 0xa0c4
39#define RCSE 0xa0c8
40#define RUND 0xa0cc
41#define ROVR 0xa0d0
42#define RFRG 0xa0d4
43#define RJBR 0xa0d8
44#define RDRP 0xa0dc
45#define TMCA 0xa0e8
46#define TBCA 0xa0ec
47#define TXPF 0xa0f0
48#define TDFR 0xa0f4
49#define TEDF 0xa0f8
50#define TSCL 0xa0fc
51#define TMCL 0xa100
52#define TLCL 0xa104
53#define TXCL 0xa108
54#define TNCL 0xa10c
55#define TPFH 0xa110
56#define TDRP 0xa114
57#define TJBR 0xa118
58#define TFCS 0xa11c
59#define TXCF 0xa120
60#define TOVR 0xa124
61#define TUND 0xa128
62#define TFRG 0xa12c
63
64void xge_set_ethtool_ops(struct net_device *ndev);
65
66#endif /* __XGENE_ENET_V2_ETHTOOL_H__ */
1/*
2 * Applied Micro X-Gene SoC Ethernet v2 Driver
3 *
4 * Copyright (c) 2017, Applied Micro Circuits Corporation
5 * Author(s): Iyappan Subramanian <isubramanian@apm.com>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef __XGENE_ENET_V2_ETHTOOL_H__
22#define __XGENE_ENET_V2_ETHTOOL_H__
23
24struct xge_gstrings_stats {
25 char name[ETH_GSTRING_LEN];
26 int offset;
27};
28
29struct xge_gstrings_extd_stats {
30 char name[ETH_GSTRING_LEN];
31 u32 addr;
32 u32 value;
33};
34
35#define TR64 0xa080
36#define TR127 0xa084
37#define TR255 0xa088
38#define TR511 0xa08c
39#define TR1K 0xa090
40#define TRMAX 0xa094
41#define TRMGV 0xa098
42#define RFCS 0xa0a4
43#define RMCA 0xa0a8
44#define RBCA 0xa0ac
45#define RXCF 0xa0b0
46#define RXPF 0xa0b4
47#define RXUO 0xa0b8
48#define RALN 0xa0bc
49#define RFLR 0xa0c0
50#define RCDE 0xa0c4
51#define RCSE 0xa0c8
52#define RUND 0xa0cc
53#define ROVR 0xa0d0
54#define RFRG 0xa0d4
55#define RJBR 0xa0d8
56#define RDRP 0xa0dc
57#define TMCA 0xa0e8
58#define TBCA 0xa0ec
59#define TXPF 0xa0f0
60#define TDFR 0xa0f4
61#define TEDF 0xa0f8
62#define TSCL 0xa0fc
63#define TMCL 0xa100
64#define TLCL 0xa104
65#define TXCL 0xa108
66#define TNCL 0xa10c
67#define TPFH 0xa110
68#define TDRP 0xa114
69#define TJBR 0xa118
70#define TFCS 0xa11c
71#define TXCF 0xa120
72#define TOVR 0xa124
73#define TUND 0xa128
74#define TFRG 0xa12c
75
76void xge_set_ethtool_ops(struct net_device *ndev);
77
78#endif /* __XGENE_ENET_V2_ETHTOOL_H__ */