]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: Support enhanced addressing mode for DWMAC 4.10
authorThierry Reding <treding@nvidia.com>
Wed, 2 Oct 2019 14:52:58 +0000 (16:52 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Oct 2019 19:00:50 +0000 (12:00 -0700)
commit10de2709f126ac65b3496335f5f9d2490323ec8f
treea38525a56ca577384bec444d650bca9b1e1f623c
parentd9f8f9e014f3edb957cd060e6a878dce8215fe8a
net: stmmac: Support enhanced addressing mode for DWMAC 4.10

The address width of the controller can be read from hardware feature
registers much like on XGMAC. Add support for parsing the ADDR64 field
so that the DMA mask can be set accordingly.

This avoids getting swiotlb involved for DMA on Tegra186 and later.

Also make sure that the upper 32 bits of the DMA address are written to
the DMA descriptors when enhanced addressing mode is used. Similarily,
for each channel, the upper 32 bits of the DMA descriptor ring's base
address also need to be programmed to make sure the correct memory can
be fetched when the DMA descriptor ring is located beyond the 32-bit
boundary.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac4.h
drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h