Manually rebased: backport-5.15/704-15-v5.19-net-mtk_eth_soc-move-MAC_MCR-setting-to-mac_finish.patch Removed upstreamed: backport-5.15/060-v6.0-01-tools-build-Add-feature-test-for-init_disassemble_in.patch[1] backport-5.15/060-v6.0-02-tools-include-add-dis-asm-compat.h-to-handle-version.patch[2] backport-5.15/060-v6.0-03-tools-perf-Fix-compilation-error-with-new-binutils.patch[3] backport-5.15/060-v6.0-04-tools-bpf_jit_disasm-Fix-compilation-error-with-new-.patch[4] backport-5.15/060-v6.0-05-tools-bpftool-Fix-compilation-error-with-new-binutil.patch[5] pending-5.15/733-02-net-ethernet-mtk_eth_soc-fix-RX-data-corruption-issu.patch[6] bcm47xx/patches-5.15/170-bgmac-fix-initial-chip-reset-to-support-BCM5358.patch[7] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=51b99dc38c1a053e2e732d7f9e2740e343ae7eae 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=451c9d7b16169645ed291ebb2ca9844caa088f2d 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=97f005c0bdbaf656a7808586d234965385a06c58 4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=1c27fab243333821375e4d63128d60093fdbe149 5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=4441a90091931fd81607567961dc122f24f735bb 6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=2adc29350a5b4669544566f71f208d2abaec60ab 7. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=04bfc5bcdfc0fdb73587487c71b04d63807ae15a Build system: x86_64 Build-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod Run-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod Signed-off-by: John Audia <therealgraysky@proton.me>
81 lines
2.4 KiB
Diff
81 lines
2.4 KiB
Diff
From 0dcbe607cec32ccae23b02a641b8bd6191a328ae Mon Sep 17 00:00:00 2001
|
|
Message-Id: <0dcbe607cec32ccae23b02a641b8bd6191a328ae.1662243796.git.lorenzo@kernel.org>
|
|
In-Reply-To: <43a21841ce0175d29f23c34a65ceaaf9dd7eb8b7.1662243796.git.lorenzo@kernel.org>
|
|
References: <43a21841ce0175d29f23c34a65ceaaf9dd7eb8b7.1662243796.git.lorenzo@kernel.org>
|
|
From: Lorenzo Bianconi <lorenzo@kernel.org>
|
|
Date: Tue, 23 Aug 2022 23:09:05 +0200
|
|
Subject: [PATCH net-next 2/4] net: ethernet: mtk_eth_soc: move wdma_base
|
|
definitions in mtk register map
|
|
|
|
This is a preliminary patch to introduce mt7986 wed support.
|
|
|
|
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
|
|
---
|
|
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 16 ++++++++++------
|
|
drivers/net/ethernet/mediatek/mtk_eth_soc.h | 4 +---
|
|
2 files changed, 11 insertions(+), 9 deletions(-)
|
|
|
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
|
@@ -75,6 +75,10 @@ static const struct mtk_reg_map mtk_reg_
|
|
.gdm1_cnt = 0x2400,
|
|
.gdma_to_ppe0 = 0x4444,
|
|
.ppe_base = 0x0c00,
|
|
+ .wdma_base = {
|
|
+ [0] = 0x2800,
|
|
+ [1] = 0x2c00,
|
|
+ },
|
|
};
|
|
|
|
static const struct mtk_reg_map mt7628_reg_map = {
|
|
@@ -130,6 +134,10 @@ static const struct mtk_reg_map mt7986_r
|
|
.gdm1_cnt = 0x1c00,
|
|
.gdma_to_ppe0 = 0x3333,
|
|
.ppe_base = 0x2000,
|
|
+ .wdma_base = {
|
|
+ [0] = 0x4800,
|
|
+ [1] = 0x4c00,
|
|
+ },
|
|
};
|
|
|
|
/* strings used by ethtool */
|
|
@@ -3970,16 +3978,12 @@ static int mtk_probe(struct platform_dev
|
|
for (i = 0;; i++) {
|
|
struct device_node *np = of_parse_phandle(pdev->dev.of_node,
|
|
"mediatek,wed", i);
|
|
- static const u32 wdma_regs[] = {
|
|
- MTK_WDMA0_BASE,
|
|
- MTK_WDMA1_BASE
|
|
- };
|
|
void __iomem *wdma;
|
|
|
|
- if (!np || i >= ARRAY_SIZE(wdma_regs))
|
|
+ if (!np || i >= ARRAY_SIZE(eth->soc->reg_map->wdma_base))
|
|
break;
|
|
|
|
- wdma = eth->base + wdma_regs[i];
|
|
+ wdma = eth->base + eth->soc->reg_map->wdma_base[i];
|
|
mtk_wed_add_hw(np, eth, wdma, i);
|
|
}
|
|
|
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
|
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
|
|
@@ -268,9 +268,6 @@
|
|
#define TX_DMA_FPORT_MASK_V2 0xf
|
|
#define TX_DMA_SWC_V2 BIT(30)
|
|
|
|
-#define MTK_WDMA0_BASE 0x2800
|
|
-#define MTK_WDMA1_BASE 0x2c00
|
|
-
|
|
/* QDMA descriptor txd4 */
|
|
#define TX_DMA_CHKSUM (0x7 << 29)
|
|
#define TX_DMA_TSO BIT(28)
|
|
@@ -954,6 +951,7 @@ struct mtk_reg_map {
|
|
u32 gdm1_cnt;
|
|
u32 gdma_to_ppe0;
|
|
u32 ppe_base;
|
|
+ u32 wdma_base[2];
|
|
};
|
|
|
|
/* struct mtk_eth_data - This is the structure holding all differences
|