netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH net-next 00/13] Enhance stmmac driver to support GMAC4.x IP
@ 2016-04-01  9:37 Alexandre TORGUE
  2016-04-01  9:37 ` [RESEND PATCH net-next 01/13] stmmac: rework get_hw_feature function Alexandre TORGUE
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: Alexandre TORGUE @ 2016-04-01  9:37 UTC (permalink / raw)
  To: netdev, peppe.cavallaro; +Cc: Lars Persson

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 5064 bytes --]

This is a subset of patch to enhance current stmmac driver to support
new GMAC4.x chips. New set of callbacks is defined to support this new
family: descriptors, dma, core.

One of main changes of GMAC 4.xx IP is descriptors management.
 -descriptors are only used in ring mode.
 -A descriptor is composed of 4 32bits registers (no more extended
  descriptors)
 -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.
  
New features are available on IP:
 -TSO (TCP Segmentation Offload) for TX only
 -Split header: to have header and payload in 2 different buffers (not yet implemented)

Below some throughput figures obtained on some boxes:

                        iperf (mbps) 
--------------------------------------
                       tcp     udp    
                    tx   rx   tx  rx  
                     -----------------
    GMAC4.x         935  930  750 800 

Note: There is a change in 4.10a databook on bitfield mapping of DMA_CHANx_INTR_ENA register. 
This requires to have é diffrent set of callbacks between IP 4.00a and 4.10a.

Best regards

Alex

I'm resending this series because first sending was badly done during merge
window.

Alexandre TORGUE (13):
  stmmac: rework get_hw_feature function
  stmmac: rework the routines to show the ring status
  stmmac: rework synopsys id read, moved to dwmac setup
  stmmac: add descriptors function for GMAC 4.xx
  stmmac: add GMAC4 DMA/CORE Header File
  stmmac: add DMA support for GMAC 4.xx
  stmmac: add GMAC4 core support
  stmmac: enhance mmc counter management
  stmmac: add new DT platform entries for GMAC4
  stmmac: support new GMAC4
  Documentation: networking: update stmmac
  stmmac: update version to Jan_2016
  stmmac: update MAINTAINERS

 Documentation/devicetree/bindings/net/stmmac.txt   |   2 +
 Documentation/networking/stmmac.txt                |  44 +-
 MAINTAINERS                                        |   1 +
 drivers/net/ethernet/stmicro/stmmac/Makefile       |   3 +-
 drivers/net/ethernet/stmicro/stmmac/common.h       |  64 +-
 .../net/ethernet/stmicro/stmmac/dwmac1000_core.c   |   7 +-
 .../net/ethernet/stmicro/stmmac/dwmac1000_dma.c    |  35 +-
 .../net/ethernet/stmicro/stmmac/dwmac100_core.c    |   5 +-
 drivers/net/ethernet/stmicro/stmmac/dwmac4.h       | 255 ++++++++
 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c  | 407 +++++++++++++
 drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c | 396 +++++++++++++
 drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.h | 129 +++++
 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c   | 354 ++++++++++++
 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h   | 202 +++++++
 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c   | 225 +++++++
 drivers/net/ethernet/stmicro/stmmac/enh_desc.c     |  21 +
 drivers/net/ethernet/stmicro/stmmac/mmc.h          |   4 +
 drivers/net/ethernet/stmicro/stmmac/mmc_core.c     | 349 +++++------
 drivers/net/ethernet/stmicro/stmmac/norm_desc.c    |  21 +
 drivers/net/ethernet/stmicro/stmmac/stmmac.h       |   7 +-
 .../net/ethernet/stmicro/stmmac/stmmac_ethtool.c   |   7 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c  | 643 +++++++++++++++------
 .../net/ethernet/stmicro/stmmac/stmmac_platform.c  |   7 +
 include/linux/stmmac.h                             |   2 +
 24 files changed, 2821 insertions(+), 369 deletions(-)
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac4.h
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.h
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c

-- 
1.9.1

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-04-03  0:33 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-01  9:37 [RESEND PATCH net-next 00/13] Enhance stmmac driver to support GMAC4.x IP Alexandre TORGUE
2016-04-01  9:37 ` [RESEND PATCH net-next 01/13] stmmac: rework get_hw_feature function Alexandre TORGUE
2016-04-01  9:37 ` [RESEND PATCH net-next 02/13] stmmac: rework the routines to show the ring status Alexandre TORGUE
2016-04-01  9:37 ` [RESEND PATCH net-next 03/13] stmmac: rework synopsys id read, moved to dwmac setup Alexandre TORGUE
2016-04-01  9:37 ` [RESEND PATCH net-next 04/13] stmmac: add descriptors function for GMAC 4.xx Alexandre TORGUE
2016-04-01  9:37 ` [RESEND PATCH net-next 05/13] stmmac: add GMAC4 DMA/CORE Header File Alexandre TORGUE
2016-04-01  9:37 ` [RESEND PATCH net-next 06/13] stmmac: add DMA support for GMAC 4.xx Alexandre TORGUE
2016-04-01  9:37 ` [RESEND PATCH net-next 07/13] stmmac: add GMAC4 core support Alexandre TORGUE
2016-04-01  9:37 ` [RESEND PATCH net-next 08/13] stmmac: enhance mmc counter management Alexandre TORGUE
2016-04-01  9:37 ` [RESEND PATCH net-next 09/13] stmmac: add new DT platform entries for GMAC4 Alexandre TORGUE
2016-04-01  9:37 ` [RESEND PATCH net-next 10/13] stmmac: support new GMAC4 Alexandre TORGUE
2016-04-01  9:37 ` [RESEND PATCH net-next 11/13] Documentation: networking: update stmmac Alexandre TORGUE
2016-04-01  9:37 ` [RESEND PATCH net-next 12/13] stmmac: update version to Jan_2016 Alexandre TORGUE
2016-04-01  9:37 ` [RESEND PATCH net-next 13/13] stmmac: update MAINTAINERS Alexandre TORGUE
2016-04-03  0:23 ` [RESEND PATCH net-next 00/13] Enhance stmmac driver to support GMAC4.x IP David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).