Skip to content

stmmac: Add Loongson platform support

Feiyang Chen loongarch netdev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest11 patches 4 repliesIn review
  2. v316 patches 8 repliesSuperseded
  3. v210 patches 30 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v1 RFC10 patches27 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11net: stmmac: Pass stmmac_priv and chan in some callbacksdrivers/net/ethernet/stmicro/stmmac/chain_mode.c drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c +18 more+146 -1101 reply
2/11stmmac: dwmac1000: Add 64-bit DMA supportdrivers/net/ethernet/stmicro/stmmac/Makefile drivers/net/ethernet/stmicro/stmmac/chain_mode.c drivers/net/ethernet/stmicro/stmmac/common.h +8 more+302 -270 replies
3/11stmmac: Add extended GMAC support for Loongson platformsdrivers/net/ethernet/stmicro/stmmac/Makefile drivers/net/ethernet/stmicro/stmmac/common.h drivers/net/ethernet/stmicro/stmmac/dwegmac.h +8 more+1651 -51 reply
4/11net: stmmac: Allow platforms to set irq_flagsdrivers/net/ethernet/stmicro/stmmac/stmmac_main.c include/linux/stmmac.h+10 -70 replies
5/11net: stmmac: dwmac-loongson: Refactor code for loongson_dwmac_probe()drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c+54 -350 replies
6/11net: stmmac: dwmac-loongson: Add LS7A supportdrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c+44 -370 replies
7/11net: stmmac: dwmac-loongson: Add 64-bit DMA and MSI supportdrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c+123 -300 replies
8/11net: stmmac: dwegmac: Fix channel numbersdrivers/net/ethernet/stmicro/stmmac/dwegmac_dma.c drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c include/linux/stmmac.h+14 -20 replies
9/11net: stmmac: dwmac-loongson: Disable flow control for GMACdrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c drivers/net/ethernet/stmicro/stmmac/stmmac_main.c include/linux/stmmac.h+7 -20 replies
10/11net: stmmac: dwegmac: Disable coedrivers/net/ethernet/stmicro/stmmac/hwif.c+5 -00 replies
11/11net: stmmac: dwmac-loongson: Add GNET supportdrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +1 more+92 -11 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 00/11] stmmac: Add Loongson platform support

Add and extend stmmac functions and macros for Loongson DWMAC. Add LS7A support and GNET support for dwmac_loongson.

Split the code for extended GMAC (dwegmac) from dwmac1000, try not to mix up registers and core id.

Some features of Loongson platforms are bound to the GMAC_VERSION register. We have to read its value in dwmac-loongson in order to get the correct channel number and DMA configuration.

The current usage of stmmac_request_irq_multi_msi() is limited to dwmac-intel. While it appears that setting irq_flags might not be necessary for dwmac-intel, it should be configured for other drivers like dwmac-loongson. I've observed many drivers directly setting irq_flags within their probe functions or data structures without referencing the DT. Since I'm unsure about the proper handling of irq_flags, I've chosen to retain the code as-is.

Feiyang Chen (11):
net: stmmac: Pass stmmac_priv and chan in some callbacks
stmmac: dwmac1000: Add 64-bit DMA support
stmmac: Add extended GMAC support for Loongson platforms
net: stmmac: Allow platforms to set irq_flags
net: stmmac: dwmac-loongson: Refactor code for loongson_dwmac_probe()
net: stmmac: dwmac-loongson: Add LS7A support
net: stmmac: dwmac-loongson: Add 64-bit DMA and MSI support
net: stmmac: dwegmac: Fix channel numbers
net: stmmac: dwmac-loongson: Disable flow control for GMAC
net: stmmac: dwegmac: Disable coe
net: stmmac: dwmac-loongson: Add GNET support

 drivers/net/ethernet/stmicro/stmmac/Makefile  |   2 +-
 .../net/ethernet/stmicro/stmmac/chain_mode.c  |  29 +-
 drivers/net/ethernet/stmicro/stmmac/common.h  |   3 +
 drivers/net/ethernet/stmicro/stmmac/descs.h   |   7 +
 .../net/ethernet/stmicro/stmmac/descs_com.h   |  47 +-
 drivers/net/ethernet/stmicro/stmmac/dwegmac.h | 332 +++++++++++
 .../ethernet/stmicro/stmmac/dwegmac_core.c    | 552 ++++++++++++++++++
 .../net/ethernet/stmicro/stmmac/dwegmac_dma.c | 522 +++++++++++++++++
 .../net/ethernet/stmicro/stmmac/dwegmac_dma.h | 190 ++++++
 .../ethernet/stmicro/stmmac/dwmac-loongson.c  | 338 ++++++++---
 .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c |  22 +-
 .../ethernet/stmicro/stmmac/dwmac1000_core.c  |   9 +-
 .../ethernet/stmicro/stmmac/dwmac1000_dma.c   |  54 +-
 .../ethernet/stmicro/stmmac/dwmac100_core.c   |   9 +-
 .../ethernet/stmicro/stmmac/dwmac100_dma.c    |   2 +-
 .../net/ethernet/stmicro/stmmac/dwmac4_core.c |  11 +-
 .../ethernet/stmicro/stmmac/dwmac4_descs.c    |  17 +-
 .../net/ethernet/stmicro/stmmac/dwmac4_dma.c  |   8 +-
 .../net/ethernet/stmicro/stmmac/dwmac4_dma.h  |   2 +-
 .../net/ethernet/stmicro/stmmac/dwmac4_lib.c  |   2 +-
 .../net/ethernet/stmicro/stmmac/dwmac_dma.h   |  22 +-
 .../net/ethernet/stmicro/stmmac/dwmac_lib.c   |   5 +-
 .../ethernet/stmicro/stmmac/dwxgmac2_core.c   |  11 +-
 .../ethernet/stmicro/stmmac/dwxgmac2_descs.c  |  17 +-
 .../ethernet/stmicro/stmmac/dwxgmac2_dma.c    |  10 +-
 .../net/ethernet/stmicro/stmmac/enh_desc.c    |  38 +-
 drivers/net/ethernet/stmicro/stmmac/hwif.c    |  66 ++-
 drivers/net/ethernet/stmicro/stmmac/hwif.h    |  73 ++-
 .../net/ethernet/stmicro/stmmac/norm_desc.c   |  17 +-
 .../net/ethernet/stmicro/stmmac/ring_mode64.c | 158 +++++
 .../ethernet/stmicro/stmmac/stmmac_ethtool.c  |   8 +-
 .../net/ethernet/stmicro/stmmac/stmmac_main.c |  34 +-
 include/linux/stmmac.h                        |  11 +
 33 files changed, 2410 insertions(+), 218 deletions(-)
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwegmac.h
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwegmac_core.c
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwegmac_dma.c
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwegmac_dma.h
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/ring_mode64.c
Signature · 1 line
2.39.3