From: Alexandre TORGUE <alexandre.torgue@st.com>
To: <netdev@vger.kernel.org>, <peppe.cavallaro@st.com>
Cc: Lars Persson <lars.persson@axis.com>
Subject: [PATCH 00/13] Enhance stmmac driver to support GMAC4.x IP
Date: Fri, 25 Mar 2016 10:14:07 +0100 [thread overview]
Message-ID: <1458897260-14104-1-git-send-email-alexandre.torgue@st.com> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 4976 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
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
next reply other threads:[~2016-03-25 9:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-25 9:14 Alexandre TORGUE [this message]
2016-03-25 9:14 ` [PATCH 01/13] stmmac: rework get_hw_feature function Alexandre TORGUE
2016-03-25 9:14 ` [PATCH 02/13] stmmac: rework the routines to show the ring status Alexandre TORGUE
2016-03-25 9:14 ` [PATCH 03/13] stmmac: rework synopsys id read, moved to dwmac setup Alexandre TORGUE
2016-03-25 9:14 ` [PATCH 04/13] stmmac: add descriptors function for GMAC 4.xx Alexandre TORGUE
2016-03-25 9:14 ` [PATCH 05/13] stmmac: add GMAC4 DMA/CORE Header File Alexandre TORGUE
2016-03-25 9:14 ` [PATCH 06/13] stmmac: add DMA support for GMAC 4.xx Alexandre TORGUE
2016-03-25 9:14 ` [PATCH 07/13] stmmac: add GMAC4 core support Alexandre TORGUE
2016-03-25 9:14 ` [PATCH 08/13] stmmac: enhance mmc counter management Alexandre TORGUE
2016-03-25 9:14 ` [PATCH 09/13] stmmac: add new DT platform entries for GMAC4 Alexandre TORGUE
2016-03-25 9:14 ` [PATCH 10/13] stmmac: support new GMAC4 Alexandre TORGUE
2016-03-25 9:14 ` [PATCH 11/13] Documentation: networking: update stmmac Alexandre TORGUE
2016-03-25 9:14 ` [PATCH 12/13] stmmac: update version to Jan_2016 Alexandre TORGUE
2016-03-25 9:14 ` [PATCH 13/13] stmmac: update MAINTAINERS Alexandre TORGUE
2016-03-25 15:11 ` [PATCH 00/13] Enhance stmmac driver to support GMAC4.x IP David Miller
2016-03-25 15:21 ` Alexandre Torgue
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1458897260-14104-1-git-send-email-alexandre.torgue@st.com \
--to=alexandre.torgue@st.com \
--cc=lars.persson@axis.com \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox