Skip to content

Commit 36ff7c1

Browse files
atorguedavem330
authored andcommitted
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 <[email protected]> Signed-off-by: Alexandre TORGUE <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 477286b commit 36ff7c1

File tree

5 files changed

+188
-176
lines changed

5 files changed

+188
-176
lines changed

drivers/net/ethernet/stmicro/stmmac/mmc.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
* current value.*/
3636
#define MMC_CNTRL_PRESET 0x10
3737
#define MMC_CNTRL_FULL_HALF_PRESET 0x20
38+
39+
#define MMC_GMAC4_OFFSET 0x700
40+
#define MMC_GMAC3_X_OFFSET 0x100
41+
3842
struct stmmac_counters {
3943
unsigned int mmc_tx_octetcount_gb;
4044
unsigned int mmc_tx_framecount_gb;

0 commit comments

Comments
 (0)