Commit f07b300c authored by David S. Miller's avatar David S. Miller

Merge branch 'sja1105-stats'

Vladimir Oltean says:

====================
Ethtool statistics counters cleanup for SJA1105 DSA driver

This series removes some reported data from ethtool -S which were not
counters at all, and reorganizes the code such that counters can be read
individually and not just all at once.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 030c8198 039b167d
...@@ -30,6 +30,14 @@ typedef enum { ...@@ -30,6 +30,14 @@ typedef enum {
#include "sja1105_tas.h" #include "sja1105_tas.h"
#include "sja1105_ptp.h" #include "sja1105_ptp.h"
enum sja1105_stats_area {
MAC,
HL1,
HL2,
ETHER,
__MAX_SJA1105_STATS_AREA,
};
/* Keeps the different addresses between E/T and P/Q/R/S */ /* Keeps the different addresses between E/T and P/Q/R/S */
struct sja1105_regs { struct sja1105_regs {
u64 device_id; u64 device_id;
...@@ -61,11 +69,7 @@ struct sja1105_regs { ...@@ -61,11 +69,7 @@ struct sja1105_regs {
u64 rgmii_tx_clk[SJA1105_NUM_PORTS]; u64 rgmii_tx_clk[SJA1105_NUM_PORTS];
u64 rmii_ref_clk[SJA1105_NUM_PORTS]; u64 rmii_ref_clk[SJA1105_NUM_PORTS];
u64 rmii_ext_tx_clk[SJA1105_NUM_PORTS]; u64 rmii_ext_tx_clk[SJA1105_NUM_PORTS];
u64 mac[SJA1105_NUM_PORTS]; u64 stats[__MAX_SJA1105_STATS_AREA][SJA1105_NUM_PORTS];
u64 mac_hl1[SJA1105_NUM_PORTS];
u64 mac_hl2[SJA1105_NUM_PORTS];
u64 ether_stats[SJA1105_NUM_PORTS];
u64 qlevel[SJA1105_NUM_PORTS];
}; };
struct sja1105_info { struct sja1105_info {
......
This diff is collapsed.
...@@ -416,9 +416,9 @@ static struct sja1105_regs sja1105et_regs = { ...@@ -416,9 +416,9 @@ static struct sja1105_regs sja1105et_regs = {
.pad_mii_rx = {0x100801, 0x100803, 0x100805, 0x100807, 0x100809}, .pad_mii_rx = {0x100801, 0x100803, 0x100805, 0x100807, 0x100809},
.rmii_pll1 = 0x10000A, .rmii_pll1 = 0x10000A,
.cgu_idiv = {0x10000B, 0x10000C, 0x10000D, 0x10000E, 0x10000F}, .cgu_idiv = {0x10000B, 0x10000C, 0x10000D, 0x10000E, 0x10000F},
.mac = {0x200, 0x202, 0x204, 0x206, 0x208}, .stats[MAC] = {0x200, 0x202, 0x204, 0x206, 0x208},
.mac_hl1 = {0x400, 0x410, 0x420, 0x430, 0x440}, .stats[HL1] = {0x400, 0x410, 0x420, 0x430, 0x440},
.mac_hl2 = {0x600, 0x610, 0x620, 0x630, 0x640}, .stats[HL2] = {0x600, 0x610, 0x620, 0x630, 0x640},
/* UM10944.pdf, Table 78, CGU Register overview */ /* UM10944.pdf, Table 78, CGU Register overview */
.mii_tx_clk = {0x100013, 0x10001A, 0x100021, 0x100028, 0x10002F}, .mii_tx_clk = {0x100013, 0x10001A, 0x100021, 0x100028, 0x10002F},
.mii_rx_clk = {0x100014, 0x10001B, 0x100022, 0x100029, 0x100030}, .mii_rx_clk = {0x100014, 0x10001B, 0x100022, 0x100029, 0x100030},
...@@ -452,10 +452,10 @@ static struct sja1105_regs sja1105pqrs_regs = { ...@@ -452,10 +452,10 @@ static struct sja1105_regs sja1105pqrs_regs = {
.sgmii = 0x1F0000, .sgmii = 0x1F0000,
.rmii_pll1 = 0x10000A, .rmii_pll1 = 0x10000A,
.cgu_idiv = {0x10000B, 0x10000C, 0x10000D, 0x10000E, 0x10000F}, .cgu_idiv = {0x10000B, 0x10000C, 0x10000D, 0x10000E, 0x10000F},
.mac = {0x200, 0x202, 0x204, 0x206, 0x208}, .stats[MAC] = {0x200, 0x202, 0x204, 0x206, 0x208},
.mac_hl1 = {0x400, 0x410, 0x420, 0x430, 0x440}, .stats[HL1] = {0x400, 0x410, 0x420, 0x430, 0x440},
.mac_hl2 = {0x600, 0x610, 0x620, 0x630, 0x640}, .stats[HL2] = {0x600, 0x610, 0x620, 0x630, 0x640},
.ether_stats = {0x1400, 0x1418, 0x1430, 0x1448, 0x1460}, .stats[ETHER] = {0x1400, 0x1418, 0x1430, 0x1448, 0x1460},
/* UM11040.pdf, Table 114 */ /* UM11040.pdf, Table 114 */
.mii_tx_clk = {0x100013, 0x100019, 0x10001F, 0x100025, 0x10002B}, .mii_tx_clk = {0x100013, 0x100019, 0x10001F, 0x100025, 0x10002B},
.mii_rx_clk = {0x100014, 0x10001A, 0x100020, 0x100026, 0x10002C}, .mii_rx_clk = {0x100014, 0x10001A, 0x100020, 0x100026, 0x10002C},
...@@ -464,7 +464,6 @@ static struct sja1105_regs sja1105pqrs_regs = { ...@@ -464,7 +464,6 @@ static struct sja1105_regs sja1105pqrs_regs = {
.rgmii_tx_clk = {0x100016, 0x10001C, 0x100022, 0x100028, 0x10002E}, .rgmii_tx_clk = {0x100016, 0x10001C, 0x100022, 0x100028, 0x10002E},
.rmii_ref_clk = {0x100015, 0x10001B, 0x100021, 0x100027, 0x10002D}, .rmii_ref_clk = {0x100015, 0x10001B, 0x100021, 0x100027, 0x10002D},
.rmii_ext_tx_clk = {0x100017, 0x10001D, 0x100023, 0x100029, 0x10002F}, .rmii_ext_tx_clk = {0x100017, 0x10001D, 0x100023, 0x100029, 0x10002F},
.qlevel = {0x604, 0x614, 0x624, 0x634, 0x644},
.ptpegr_ts = {0xC0, 0xC4, 0xC8, 0xCC, 0xD0}, .ptpegr_ts = {0xC0, 0xC4, 0xC8, 0xCC, 0xD0},
.ptpschtm = 0x13, /* Spans 0x13 to 0x14 */ .ptpschtm = 0x13, /* Spans 0x13 to 0x14 */
.ptppinst = 0x15, .ptppinst = 0x15,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment