From: Feiyang Chen <chenfeiyang@loongson.cn>
To: andrew@lunn.ch, hkallweit1@gmail.com, peppe.cavallaro@st.com,
alexandre.torgue@foss.st.com, joabreu@synopsys.com,
chenhuacai@loongson.cn
Cc: Feiyang Chen <chenfeiyang@loongson.cn>,
linux@armlinux.org.uk, dongbiao@loongson.cn,
guyinggang@loongson.cn, siyanteng@loongson.cn,
loongson-kernel@lists.loongnix.cn, netdev@vger.kernel.org,
loongarch@lists.linux.dev, chris.chenfeiyang@gmail.com
Subject: [PATCH v4 00/11] stmmac: Add Loongson platform support
Date: Tue, 22 Aug 2023 17:40:25 +0800 [thread overview]
Message-ID: <cover.1692696115.git.chenfeiyang@loongson.cn> (raw)
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
--
2.39.3
next reply other threads:[~2023-08-22 9:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-22 9:40 Feiyang Chen [this message]
2023-08-22 9:40 ` [PATCH v4 01/11] net: stmmac: Pass stmmac_priv and chan in some callbacks Feiyang Chen
2023-08-22 10:03 ` Russell King (Oracle)
2023-08-22 9:40 ` [PATCH v4 02/11] stmmac: dwmac1000: Add 64-bit DMA support Feiyang Chen
2023-08-22 9:40 ` [PATCH v4 03/11] stmmac: Add extended GMAC support for Loongson platforms Feiyang Chen
2023-08-22 16:13 ` Serge Semin
2023-08-22 9:40 ` [PATCH v4 04/11] net: stmmac: Allow platforms to set irq_flags Feiyang Chen
2023-08-22 9:40 ` [PATCH v4 05/11] net: stmmac: dwmac-loongson: Refactor code for loongson_dwmac_probe() Feiyang Chen
2023-08-22 9:40 ` [PATCH v4 06/11] net: stmmac: dwmac-loongson: Add LS7A support Feiyang Chen
2023-08-22 9:40 ` [PATCH v4 07/11] net: stmmac: dwmac-loongson: Add 64-bit DMA and MSI support Feiyang Chen
2023-08-22 9:41 ` [PATCH v4 08/11] net: stmmac: dwegmac: Fix channel numbers Feiyang Chen
2023-08-22 9:41 ` [PATCH v4 09/11] net: stmmac: dwmac-loongson: Disable flow control for GMAC Feiyang Chen
2023-08-22 9:41 ` [PATCH v4 10/11] net: stmmac: dwegmac: Disable coe Feiyang Chen
2023-08-22 9:41 ` [PATCH v4 11/11] net: stmmac: dwmac-loongson: Add GNET support Feiyang Chen
2023-08-22 11:45 ` Russell King (Oracle)
2023-08-24 1:47 ` [PATCH v4 00/11] stmmac: Add Loongson platform support Feiyang Chen
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=cover.1692696115.git.chenfeiyang@loongson.cn \
--to=chenfeiyang@loongson.cn \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew@lunn.ch \
--cc=chenhuacai@loongson.cn \
--cc=chris.chenfeiyang@gmail.com \
--cc=dongbiao@loongson.cn \
--cc=guyinggang@loongson.cn \
--cc=hkallweit1@gmail.com \
--cc=joabreu@synopsys.com \
--cc=linux@armlinux.org.uk \
--cc=loongarch@lists.linux.dev \
--cc=loongson-kernel@lists.loongnix.cn \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
--cc=siyanteng@loongson.cn \
/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;
as well as URLs for NNTP newsgroup(s).