linux-hardened/drivers/net/ethernet/stmicro/stmmac
Alexandre TORGUE 48863ce594 stmmac: add DMA support for GMAC 4.xx
DMA behavior is linked to descriptor management:

-descriptor mechanism (Tx for example, but it is exactly the same for RX):
-useful registers:
-DMA_CH#_TxDesc_Ring_Len: length of transmit descriptor ring
-DMA_CH#_TxDesc_List_Address: start address of the ring
	-DMA_CH#_TxDesc_Tail_Pointer: address of the last
					      descriptor to send + 1.
	-DMA_CH#_TxDesc_Current_App_TxDesc: address of the current
						    descriptor

-The descriptor Tail Pointer register contains the pointer to the
 descriptor address (N). The base address and the current
 descriptor decide the address of the current descriptor that the
 DMA can process. The descriptors up to one location less than the
 one indicated by the descriptor tail pointer (N-1) are owned by
 the DMA. The DMA continues to process the descriptors until the
 following condition occurs:
 "current descriptor pointer == Descriptor Tail pointer"

Then the DMA goes into suspend mode. The application must perform
a write to descriptor tail pointer register and update the tail
pointer to have the following condition and to start a new transfer:
"current descriptor pointer < Descriptor tail pointer"

The DMA automatically wraps around the base address when the end
of ring is reached.

Up to 8 DMA could be use but currently we only use one (channel0)

Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-04-02 20:23:08 -04:00
..
chain_mode.c stmmac: optimize tx desc management 2016-03-02 14:21:32 -05:00
common.h stmmac: add DMA support for GMAC 4.xx 2016-04-02 20:23:08 -04:00
descs.h stmmac: change descriptor layout 2016-03-02 14:21:30 -05:00
descs_com.h stmmac: change descriptor layout 2016-03-02 14:21:30 -05:00
dwmac-generic.c stmmac: remove setup/free glue callbacks 2015-07-29 00:13:25 -07:00
dwmac-ipq806x.c stmmac: ipq806x: Return error values instead of pointers 2015-12-03 15:24:42 -05:00
dwmac-lpc18xx.c stmmac: add proper probe function to dwmac-lpc18xx 2015-07-20 20:45:57 -07:00
dwmac-meson.c stmmac: add proper probe function to dwmac-meson 2015-07-20 20:45:57 -07:00
dwmac-rk.c net: stmmac: fix double-initialization of phy_iface 2015-11-05 14:09:26 -05:00
dwmac-socfpga.c stmmac: socfpga: Provide dt node to config ptp clk source. 2015-12-15 23:20:56 -05:00
dwmac-sti.c stmmac: dwmac-sti: fix st,tx-retime-src check 2015-11-30 14:52:51 -05:00
dwmac-sunxi.c stmmac: dwmac-sunxi: Call exit cleanup function in probe error path 2015-12-14 16:11:59 -05:00
dwmac4.h stmmac: add GMAC4 DMA/CORE Header File 2016-04-02 20:23:08 -04:00
dwmac4_descs.c stmmac: add descriptors function for GMAC 4.xx 2016-04-02 20:23:07 -04:00
dwmac4_descs.h stmmac: add descriptors function for GMAC 4.xx 2016-04-02 20:23:07 -04:00
dwmac4_dma.c stmmac: add DMA support for GMAC 4.xx 2016-04-02 20:23:08 -04:00
dwmac4_dma.h stmmac: add DMA support for GMAC 4.xx 2016-04-02 20:23:08 -04:00
dwmac4_lib.c stmmac: add DMA support for GMAC 4.xx 2016-04-02 20:23:08 -04:00
dwmac100.h stmmac: share reset function between dwmac100 and dwmac1000 2016-03-02 14:21:30 -05:00
dwmac100_core.c stmmac: rework synopsys id read, moved to dwmac setup 2016-04-02 20:23:07 -04:00
dwmac100_dma.c stmmac: rework DMA bus setting and introduce new platform AXI structure 2016-03-02 14:21:30 -05:00
dwmac1000.h stmmac: rework DMA bus setting and introduce new platform AXI structure 2016-03-02 14:21:30 -05:00
dwmac1000_core.c stmmac: rework synopsys id read, moved to dwmac setup 2016-04-02 20:23:07 -04:00
dwmac1000_dma.c stmmac: rework get_hw_feature function 2016-04-02 20:23:07 -04:00
dwmac_dma.h stmmac: rework DMA bus setting and introduce new platform AXI structure 2016-03-02 14:21:30 -05:00
dwmac_lib.c stmmac: share reset function between dwmac100 and dwmac1000 2016-03-02 14:21:30 -05:00
enh_desc.c stmmac: rework the routines to show the ring status 2016-04-02 20:23:07 -04:00
Kconfig stmmac: add ipq806x glue layer 2015-05-30 17:04:36 -07:00
Makefile stmmac: add DMA support for GMAC 4.xx 2016-04-02 20:23:08 -04:00
mmc.h stmmac: fix tipo on mmc crc error 2014-08-29 19:54:36 -07:00
mmc_core.c stmmac: Trivial: fix typo in constant name 2015-06-29 12:45:04 -07:00
norm_desc.c stmmac: rework the routines to show the ring status 2016-04-02 20:23:07 -04:00
ring_mode.c stmmac: first frame prep at the end of xmit routine 2016-03-02 14:21:33 -05:00
stmmac.h stmmac: update version to Oct_2015 2016-03-02 14:21:34 -05:00
stmmac_ethtool.c stmmac: do not perform zero-copy for rx frames 2016-03-02 14:21:33 -05:00
stmmac_hwtstamp.c stmmac: Fix calculations for ptp counters when clock input = 50Mhz. 2015-12-15 23:20:56 -05:00
stmmac_main.c stmmac: rework synopsys id read, moved to dwmac setup 2016-04-02 20:23:07 -04:00
stmmac_mdio.c stmmac: fix MDIO settings 2016-04-01 14:38:59 -04:00
stmmac_pci.c stmmac: rework DMA bus setting and introduce new platform AXI structure 2016-03-02 14:21:30 -05:00
stmmac_platform.c stmmac: fix MDIO settings 2016-04-01 14:38:59 -04:00
stmmac_platform.h stmmac: move stmmac_pltfr_probe into dwmac-generic 2015-07-29 00:13:24 -07:00
stmmac_ptp.c ptp: stmmac: use helpers for converting ns to timespec. 2015-03-31 17:19:19 -04:00
stmmac_ptp.h stmmac: ptp: fix the reference clock 2014-08-29 19:54:36 -07:00