]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: stmmac: dwxgmac: Enable EDMA by default
authorJose Abreu <Jose.Abreu@synopsys.com>
Fri, 28 Jun 2019 07:29:12 +0000 (09:29 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Jun 2019 16:23:38 +0000 (09:23 -0700)
Enable the EDMA feature by default which gives higher performance.

Changes from v1:
- Do not use magic values (David)

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Cc: Joao Pinto <jpinto@synopsys.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c

index b8296eb41011b56aab7c14b24fc5146ed77057b3..c9e802faabb552dc205cbb8b07ba9a1754fb996b 100644 (file)
 #define XGMAC_BLEN8                    BIT(2)
 #define XGMAC_BLEN4                    BIT(1)
 #define XGMAC_UNDEF                    BIT(0)
+#define XGMAC_TX_EDMA_CTRL             0x00003040
+#define XGMAC_TDPS                     GENMASK(29, 0)
+#define XGMAC_RX_EDMA_CTRL             0x00003044
+#define XGMAC_RDPS                     GENMASK(29, 0)
 #define XGMAC_DMA_CH_CONTROL(x)                (0x00003100 + (0x80 * (x)))
 #define XGMAC_PBLx8                    BIT(16)
 #define XGMAC_DMA_CH_TX_CONTROL(x)     (0x00003104 + (0x80 * (x)))
index 7861a938420a149ce8254a4d469c04aa852aa5b9..42448973c36eba51fede63853f20463af33c6ae9 100644 (file)
@@ -122,6 +122,8 @@ static void dwxgmac2_dma_axi(void __iomem *ioaddr, struct stmmac_axi *axi)
        }
 
        writel(value, ioaddr + XGMAC_DMA_SYSBUS_MODE);
+       writel(XGMAC_TDPS, ioaddr + XGMAC_TX_EDMA_CTRL);
+       writel(XGMAC_RDPS, ioaddr + XGMAC_RX_EDMA_CTRL);
 }
 
 static void dwxgmac2_dma_rx_mode(void __iomem *ioaddr, int mode,