summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/stmicro/stmmac/mmc.h
diff options
context:
space:
mode:
authorAlexandre TORGUE <alexandre.torgue@st.com>2016-04-01 12:37:32 +0300
committerDavid S. Miller <davem@davemloft.net>2016-04-03 03:23:08 +0300
commit36ff7c1e94a5d43a0ea2d386b211087f77669017 (patch)
treefa8a01eb8d3ff0bffec869c773df207821b86899 /drivers/net/ethernet/stmicro/stmmac/mmc.h
parent477286b53f5576ddec0a4df0f3d0c4bd7a0ed165 (diff)
downloadlinux-36ff7c1e94a5d43a0ea2d386b211087f77669017.tar.xz
stmmac: enhance mmc counter management
For gmac3, the MMC addr map is: 0x100 - 0x2fc For gmac4, the MMC addr map is: 0x700 - 0x8fc So instead of adding 0x600 to the IO address when setup the mmc, the RMON base address is saved inside the private structure and then used to manage the counters. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/mmc.h')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/mmc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/mmc.h b/drivers/net/ethernet/stmicro/stmmac/mmc.h
index 192c2491330b..38a1a5603293 100644
--- a/drivers/net/ethernet/stmicro/stmmac/mmc.h
+++ b/drivers/net/ethernet/stmicro/stmmac/mmc.h
@@ -35,6 +35,10 @@
* current value.*/
#define MMC_CNTRL_PRESET 0x10
#define MMC_CNTRL_FULL_HALF_PRESET 0x20
+
+#define MMC_GMAC4_OFFSET 0x700
+#define MMC_GMAC3_X_OFFSET 0x100
+
struct stmmac_counters {
unsigned int mmc_tx_octetcount_gb;
unsigned int mmc_tx_framecount_gb;