From patchwork Fri Nov 10 09:08:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yanteng Si X-Patchwork-Id: 13452224 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7DF3BD307 for ; Fri, 10 Nov 2023 09:09:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=none Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D1AFDD091 for ; Fri, 10 Nov 2023 01:09:09 -0800 (PST) Received: from loongson.cn (unknown [112.20.112.120]) by gateway (Coremail) with SMTP id _____8AxlPAz801lpbI4AA--.46117S3; Fri, 10 Nov 2023 17:09:07 +0800 (CST) Received: from localhost.localdomain (unknown [112.20.112.120]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxE+Qt801lQ_Y9AA--.6266S2; Fri, 10 Nov 2023 17:09:02 +0800 (CST) From: Yanteng Si To: andrew@lunn.ch, hkallweit1@gmail.com, peppe.cavallaro@st.com, alexandre.torgue@foss.st.com, joabreu@synopsys.com Cc: Yanteng Si , fancer.lancer@gmail.com, Jose.Abreu@synopsys.com, chenhuacai@loongson.cn, linux@armlinux.org.uk, dongbiao@loongson.cn, guyinggang@loongson.cn, loongson-kernel@lists.loongnix.cn, netdev@vger.kernel.org, loongarch@lists.linux.dev, chris.chenfeiyang@gmail.com Subject: [PATCH v5 0/9] stmmac: Add Loongson platform support Date: Fri, 10 Nov 2023 17:08:44 +0800 Message-Id: X-Mailer: git-send-email 2.31.4 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CM-TRANSID: AQAAf8BxE+Qt801lQ_Y9AA--.6266S2 X-CM-S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xAIw2 0EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x02 67AKxVWUJVW8JbIYCTnIWIevJa73UjIFyTuYvjxUcbAwUUUUU v4 -> v5: * Remove an ugly and useless patch (fix channel number). * Remove the non-standard dma64 driver code, and also remove the HWIF entries, since the associated custom callbacks no longer exist. * Refer to Serge's suggestion: Update the dwmac1000_dma.c to support the multi-DMA-channels controller setup. See: v4: v3: v2: v1: Yanteng Si (9): net: stmmac: Pass stmmac_priv and chan in some callbacks net: stmmac: Allow platforms to set irq_flags net: stmmac: Add Loongson DWGMAC definitions net: stmmac: dwmac-loongson: Refactor code for loongson_dwmac_probe() net: stmmac: dwmac-loongson: Add full PCI support net: stmmac: dwmac-loongson: Add MSI support net: stmmac: dwmac-loongson: Add GNET support net: stmmac: dwmac-loongson: Disable flow control for GMAC net: stmmac: Disable coe for some Loongson GNET .../net/ethernet/stmicro/stmmac/chain_mode.c | 5 +- drivers/net/ethernet/stmicro/stmmac/common.h | 1 + .../ethernet/stmicro/stmmac/dwmac-loongson.c | 324 ++++++++++++++---- .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 22 +- .../ethernet/stmicro/stmmac/dwmac1000_core.c | 9 +- .../ethernet/stmicro/stmmac/dwmac1000_dma.c | 71 +++- .../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 | 62 +++- .../net/ethernet/stmicro/stmmac/dwmac_lib.c | 44 +-- .../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 | 17 +- drivers/net/ethernet/stmicro/stmmac/hwif.c | 10 +- drivers/net/ethernet/stmicro/stmmac/hwif.h | 71 ++-- .../net/ethernet/stmicro/stmmac/norm_desc.c | 17 +- .../ethernet/stmicro/stmmac/stmmac_ethtool.c | 6 + .../net/ethernet/stmicro/stmmac/stmmac_main.c | 30 +- include/linux/stmmac.h | 4 + 25 files changed, 563 insertions(+), 219 deletions(-)