generic: 6.1: refresh backport patches
[openwrt/staging/dangole.git] / target / linux / generic / backport-6.1 / 733-v6.3-20-net-ethernet-mtk_eth_soc-switch-to-external-PCS-driv.patch
index 203c5dc48bb0fc292ddbd1ce1558f51929968693..7a04753ceb3986e410d4292e0f26751747e1113d 100644 (file)
@@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
 
 --- a/drivers/net/ethernet/mediatek/Kconfig
 +++ b/drivers/net/ethernet/mediatek/Kconfig
-@@ -18,6 +18,8 @@ config NET_MEDIATEK_SOC
+@@ -19,6 +19,8 @@ config NET_MEDIATEK_SOC
        select DIMLIB
        select PAGE_POOL
        select PAGE_POOL_STATS
@@ -51,7 +51,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  #include <linux/jhash.h>
  #include <linux/bitfield.h>
  #include <net/dsa.h>
-@@ -357,7 +358,7 @@ static struct phylink_pcs *mtk_mac_selec
+@@ -400,7 +401,7 @@ static struct phylink_pcs *mtk_mac_selec
                sid = (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_SGMII)) ?
                       0 : mac->id;
  
@@ -60,7 +60,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
        }
  
        return NULL;
-@@ -3977,8 +3978,17 @@ static int mtk_unreg_dev(struct mtk_eth
+@@ -4031,8 +4032,17 @@ static int mtk_unreg_dev(struct mtk_eth
        return 0;
  }
  
@@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
        mtk_unreg_dev(eth);
        mtk_free_dev(eth);
        cancel_work_sync(&eth->pending_work);
-@@ -4408,6 +4418,36 @@ void mtk_eth_set_dma_device(struct mtk_e
+@@ -4462,6 +4472,36 @@ void mtk_eth_set_dma_device(struct mtk_e
        rtnl_unlock();
  }
  
@@ -115,7 +115,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  static int mtk_probe(struct platform_device *pdev)
  {
        struct resource *res = NULL;
-@@ -4471,13 +4511,7 @@ static int mtk_probe(struct platform_dev
+@@ -4525,13 +4565,7 @@ static int mtk_probe(struct platform_dev
        }
  
        if (MTK_HAS_CAPS(eth->soc->caps, MTK_SGMII)) {
@@ -130,7 +130,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  
                if (err)
                        return err;
-@@ -4488,14 +4522,17 @@ static int mtk_probe(struct platform_dev
+@@ -4542,14 +4576,17 @@ static int mtk_probe(struct platform_dev
                                                            "mediatek,pctl");
                if (IS_ERR(eth->pctl)) {
                        dev_err(&pdev->dev, "no pctl regmap found\n");
@@ -151,7 +151,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
        }
  
        if (eth->soc->offload_version) {
-@@ -4655,6 +4692,8 @@ err_deinit_hw:
+@@ -4708,6 +4745,8 @@ err_deinit_hw:
        mtk_hw_deinit(eth);
  err_wed_exit:
        mtk_wed_exit();
@@ -162,7 +162,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  }
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
-@@ -507,65 +507,6 @@
+@@ -510,65 +510,6 @@
  #define ETHSYS_DMA_AG_MAP_QDMA        BIT(1)
  #define ETHSYS_DMA_AG_MAP_PPE BIT(2)
  
@@ -228,7 +228,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  /* Infrasys subsystem config registers */
  #define INFRA_MISC2            0x70c
  #define CO_QPHY_SEL            BIT(0)
-@@ -1105,31 +1046,6 @@ struct mtk_soc_data {
+@@ -1108,31 +1049,6 @@ struct mtk_soc_data {
  /* currently no SoC has more than 2 macs */
  #define MTK_MAX_DEVS                  2
  
@@ -260,7 +260,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  /* struct mtk_eth -   This is the main datasructure for holding the state
   *                    of the driver
   * @dev:              The device pointer
-@@ -1149,6 +1065,7 @@ struct mtk_sgmii {
+@@ -1152,6 +1068,7 @@ struct mtk_sgmii {
   *                    MII modes
   * @infra:              The register map pointing at the range used to setup
   *                      SGMII and GePHY path
@@ -268,7 +268,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
   * @pctl:             The register map pointing at the range used to setup
   *                    GMAC port drive/slew values
   * @dma_refcnt:               track how many netdevs are using the DMA engine
-@@ -1189,8 +1106,8 @@ struct mtk_eth {
+@@ -1192,8 +1109,8 @@ struct mtk_eth {
        u32                             msg_enable;
        unsigned long                   sysclk;
        struct regmap                   *ethsys;
@@ -279,7 +279,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
        struct regmap                   *pctl;
        bool                            hwlro;
        refcount_t                      dma_refcnt;
-@@ -1352,10 +1269,6 @@ void mtk_stats_update_mac(struct mtk_mac
+@@ -1355,10 +1272,6 @@ void mtk_stats_update_mac(struct mtk_mac
  void mtk_w32(struct mtk_eth *eth, u32 val, unsigned reg);
  u32 mtk_r32(struct mtk_eth *eth, unsigned reg);