diff options
Diffstat (limited to 'target/linux/mediatek')
7 files changed, 20 insertions, 82 deletions
diff --git a/target/linux/mediatek/patches-5.4/0400-eth-fix-rx-vlan-hw-offload.patch b/target/linux/mediatek/patches-5.4/0400-eth-fix-rx-vlan-hw-offload.patch index b1fda5eeec..dd75edf116 100644 --- a/target/linux/mediatek/patches-5.4/0400-eth-fix-rx-vlan-hw-offload.patch +++ b/target/linux/mediatek/patches-5.4/0400-eth-fix-rx-vlan-hw-offload.patch @@ -1,6 +1,6 @@ --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1306,7 +1306,7 @@ static int mtk_poll_rx(struct napi_struc +@@ -1315,7 +1315,7 @@ static int mtk_poll_rx(struct napi_struc skb->protocol = eth_type_trans(skb, netdev); if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX && diff --git a/target/linux/mediatek/patches-5.4/0401-eth-fix-eth1-tx-timeout.patch b/target/linux/mediatek/patches-5.4/0401-eth-fix-eth1-tx-timeout.patch index 271a70df62..4072118302 100644 --- a/target/linux/mediatek/patches-5.4/0401-eth-fix-eth1-tx-timeout.patch +++ b/target/linux/mediatek/patches-5.4/0401-eth-fix-eth1-tx-timeout.patch @@ -1,6 +1,6 @@ --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1112,17 +1112,6 @@ static void mtk_wake_queue(struct mtk_et +@@ -1121,17 +1121,6 @@ static void mtk_wake_queue(struct mtk_et } } @@ -18,7 +18,7 @@ static int mtk_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct mtk_mac *mac = netdev_priv(dev); -@@ -1143,7 +1132,7 @@ static int mtk_start_xmit(struct sk_buff +@@ -1152,7 +1141,7 @@ static int mtk_start_xmit(struct sk_buff tx_num = mtk_cal_txd_req(skb); if (unlikely(atomic_read(&ring->free_count) <= tx_num)) { @@ -27,7 +27,7 @@ netif_err(eth, tx_queued, dev, "Tx Ring full when queue awake!\n"); spin_unlock(ð->page_lock); -@@ -1169,7 +1158,7 @@ static int mtk_start_xmit(struct sk_buff +@@ -1178,7 +1167,7 @@ static int mtk_start_xmit(struct sk_buff goto drop; if (unlikely(atomic_read(&ring->free_count) <= ring->thresh)) diff --git a/target/linux/mediatek/patches-5.4/0402-net-ethernet-mtk_eth_soc-Always-call-mtk_gmac0_rgmii.patch b/target/linux/mediatek/patches-5.4/0402-net-ethernet-mtk_eth_soc-Always-call-mtk_gmac0_rgmii.patch deleted file mode 100644 index 0dc50f28d8..0000000000 --- a/target/linux/mediatek/patches-5.4/0402-net-ethernet-mtk_eth_soc-Always-call-mtk_gmac0_rgmii.patch +++ /dev/null @@ -1,62 +0,0 @@ -In-Reply-To: <trinity-fb0cdf15-dfcf-4d60-9144-87d8fbfad5ba-1586179542451@3c-app-gmx-bap62> -References: <trinity-fb0cdf15-dfcf-4d60-9144-87d8fbfad5ba-1586179542451@3c-app-gmx-bap62> -Subject: [PATCH] net: ethernet: mtk_eth_soc: Always call mtk_gmac0_rgmii_adjust() for mt7623 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: RenĂ© van Dorst <opensource@vdorst.com> - -Modify mtk_gmac0_rgmii_adjust() so it can always be called. -mtk_gmac0_rgmii_adjust() sets-up the TRGMII clocks. - -Signed-off-by: RenĂ© van Dorst <opensource@vdorst.com> -Signed-off-By: David Woodhouse <dwmw2@infradead.org> ---- - drivers/net/ethernet/mediatek/mtk_eth_soc.c | 19 ++++++++++++++----- - 1 file changed, 14 insertions(+), 5 deletions(-) - -diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -index b5408c5b954a..f89f225ab144 100644 ---- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c -+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -171,11 +171,21 @@ static int mt7621_gmac0_rgmii_adjust(struct mtk_eth *eth, - return 0; - } - --static void mtk_gmac0_rgmii_adjust(struct mtk_eth *eth, int speed) -+static void mtk_gmac0_rgmii_adjust(struct mtk_eth *eth, -+ phy_interface_t interface, int speed) - { - u32 val; - int ret; - -+ if (interface == PHY_INTERFACE_MODE_TRGMII) { -+ mtk_w32(eth, TRGMII_MODE, INTF_MODE); -+ val = 500000000; -+ ret = clk_set_rate(eth->clks[MTK_CLK_TRGPLL], val); -+ if (ret) -+ dev_err(eth->dev, "Failed to set trgmii pll: %d\n", ret); -+ return; -+ } -+ - val = (speed == SPEED_1000) ? - INTF_MODE_RGMII_1000 : INTF_MODE_RGMII_10_100; - mtk_w32(eth, val, INTF_MODE); -@@ -262,10 +272,9 @@ static void mtk_mac_config(struct phylink_config *config, unsigned int mode, - state->interface)) - goto err_phy; - } else { -- if (state->interface != -- PHY_INTERFACE_MODE_TRGMII) -- mtk_gmac0_rgmii_adjust(mac->hw, -- state->speed); -+ mtk_gmac0_rgmii_adjust(mac->hw, -+ state->interface, -+ state->speed); - - /* mt7623_pad_clk_setup */ - for (i = 0 ; i < NUM_TRGMII_CTRL; i++) --- -2.26.2 - diff --git a/target/linux/mediatek/patches-5.4/0991-dt-bindings-PCI-Mediatek-Update-PCIe-binding.patch b/target/linux/mediatek/patches-5.4/0991-dt-bindings-PCI-Mediatek-Update-PCIe-binding.patch index e32042301f..02e4c130ea 100644 --- a/target/linux/mediatek/patches-5.4/0991-dt-bindings-PCI-Mediatek-Update-PCIe-binding.patch +++ b/target/linux/mediatek/patches-5.4/0991-dt-bindings-PCI-Mediatek-Update-PCIe-binding.patch @@ -382,8 +382,7 @@ Signed-off-by: chuanjia.liu <Chuanjia.Liu@mediatek.com> }; }; + }; - -- pcie1: pcie@1,0 { ++ + pcie1: pcie@1a145000 { + compatible = "mediatek,mt7622-pcie"; + device_type = "pci"; @@ -408,7 +407,8 @@ Signed-off-by: chuanjia.liu <Chuanjia.Liu@mediatek.com> + bus-range = <0x00 0xff>; + ranges = <0x82000000 0 0x28000000 0 0x28000000 0 0x8000000>; + status = "disabled"; -+ + +- pcie1: pcie@1,0 { + slot1: pcie@1,0 { reg = <0x0800 0 0 0 0>; #address-cells = <3>; diff --git a/target/linux/mediatek/patches-5.4/0999-hnat.patch b/target/linux/mediatek/patches-5.4/0999-hnat.patch index f0af321fd8..26e4a0a54d 100644 --- a/target/linux/mediatek/patches-5.4/0999-hnat.patch +++ b/target/linux/mediatek/patches-5.4/0999-hnat.patch @@ -147,7 +147,7 @@ #include "mtk_eth_soc.h" -@@ -1298,8 +1300,16 @@ static int mtk_poll_rx(struct napi_struc +@@ -1307,8 +1309,16 @@ static int mtk_poll_rx(struct napi_struc (trxd.rxd2 & RX_DMA_VTAG)) __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), RX_DMA_VID(trxd.rxd3)); @@ -166,7 +166,7 @@ ring->data[idx] = new_data; rxd->rxd1 = (unsigned int)dma_addr; -@@ -2216,6 +2226,9 @@ static int mtk_open(struct net_device *d +@@ -2225,6 +2235,9 @@ static int mtk_open(struct net_device *d mtk_tx_irq_enable(eth, MTK_TX_DONE_INT); mtk_rx_irq_enable(eth, MTK_RX_DONE_INT); refcount_set(ð->dma_refcnt, 1); @@ -176,7 +176,7 @@ } else refcount_inc(ð->dma_refcnt); -@@ -2274,6 +2287,9 @@ static int mtk_stop(struct net_device *d +@@ -2283,6 +2296,9 @@ static int mtk_stop(struct net_device *d mtk_dma_free(eth); @@ -186,7 +186,7 @@ return 0; } -@@ -2733,6 +2749,27 @@ static int mtk_set_rxnfc(struct net_devi +@@ -2742,6 +2758,27 @@ static int mtk_set_rxnfc(struct net_devi return ret; } @@ -214,7 +214,7 @@ static const struct ethtool_ops mtk_ethtool_ops = { .get_link_ksettings = mtk_get_link_ksettings, .set_link_ksettings = mtk_set_link_ksettings, -@@ -2764,6 +2801,9 @@ static const struct net_device_ops mtk_n +@@ -2773,6 +2810,9 @@ static const struct net_device_ops mtk_n #ifdef CONFIG_NET_POLL_CONTROLLER .ndo_poll_controller = mtk_poll_controller, #endif @@ -224,7 +224,7 @@ }; static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) -@@ -3097,6 +3137,7 @@ static const struct mtk_soc_data mt7622_ +@@ -3108,6 +3148,7 @@ static const struct mtk_soc_data mt7622_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7622_CLKS_BITMAP, .required_pctl = false, diff --git a/target/linux/mediatek/patches-5.4/1000-eth-gdm-config-backport.patch b/target/linux/mediatek/patches-5.4/1000-eth-gdm-config-backport.patch index 7b8d186aa4..78932933de 100644 --- a/target/linux/mediatek/patches-5.4/1000-eth-gdm-config-backport.patch +++ b/target/linux/mediatek/patches-5.4/1000-eth-gdm-config-backport.patch @@ -1,6 +1,6 @@ --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -2201,6 +2201,31 @@ static int mtk_start_dma(struct mtk_eth +@@ -2210,6 +2210,31 @@ static int mtk_start_dma(struct mtk_eth return 0; } @@ -32,7 +32,7 @@ static int mtk_open(struct net_device *dev) { struct mtk_mac *mac = netdev_priv(dev); -@@ -2221,6 +2246,8 @@ static int mtk_open(struct net_device *d +@@ -2230,6 +2255,8 @@ static int mtk_open(struct net_device *d if (err) return err; @@ -41,7 +41,7 @@ napi_enable(ð->tx_napi); napi_enable(ð->rx_napi); mtk_tx_irq_enable(eth, MTK_TX_DONE_INT); -@@ -2276,6 +2303,8 @@ static int mtk_stop(struct net_device *d +@@ -2285,6 +2312,8 @@ static int mtk_stop(struct net_device *d if (!refcount_dec_and_test(ð->dma_refcnt)) return 0; @@ -50,7 +50,7 @@ mtk_tx_irq_disable(eth, MTK_TX_DONE_INT); mtk_rx_irq_disable(eth, MTK_RX_DONE_INT); napi_disable(ð->tx_napi); -@@ -2402,8 +2431,6 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -2411,8 +2440,6 @@ static int mtk_hw_init(struct mtk_eth *e mtk_w32(eth, 0, MTK_QDMA_DELAY_INT); mtk_tx_irq_disable(eth, ~0); mtk_rx_irq_disable(eth, ~0); @@ -59,7 +59,7 @@ /* FE int grouping */ mtk_w32(eth, MTK_TX_DONE_INT, MTK_PDMA_INT_GRP1); -@@ -2412,19 +2439,6 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -2421,19 +2448,6 @@ static int mtk_hw_init(struct mtk_eth *e mtk_w32(eth, MTK_RX_DONE_INT, MTK_QDMA_INT_GRP2); mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP); diff --git a/target/linux/mediatek/patches-5.4/1001-eth-mtk-disable-TBDDONE-support.patch b/target/linux/mediatek/patches-5.4/1001-eth-mtk-disable-TBDDONE-support.patch index ea1d1dce2e..a1ddc3d5df 100644 --- a/target/linux/mediatek/patches-5.4/1001-eth-mtk-disable-TBDDONE-support.patch +++ b/target/linux/mediatek/patches-5.4/1001-eth-mtk-disable-TBDDONE-support.patch @@ -1,6 +1,6 @@ --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1355,10 +1355,11 @@ static int mtk_poll_tx_qdma(struct mtk_e +@@ -1364,10 +1364,11 @@ static int mtk_poll_tx_qdma(struct mtk_e u32 next_cpu = desc->txd2; int mac = 0; @@ -13,7 +13,7 @@ tx_buf = mtk_desc_to_tx_buf(ring, desc); if (tx_buf->flags & MTK_TX_FLAGS_FPORT1) mac = 1; -@@ -2182,7 +2183,7 @@ static int mtk_start_dma(struct mtk_eth +@@ -2191,7 +2192,7 @@ static int mtk_start_dma(struct mtk_eth if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) { mtk_w32(eth, |