ipq40xx: merge all ar40xx patches into one single patch
authorJohn Crispin <john@phrozen.org>
Tue, 14 Jul 2020 07:50:31 +0000 (09:50 +0200)
committerJohn Crispin <john@phrozen.org>
Tue, 14 Jul 2020 16:31:12 +0000 (18:31 +0200)
Signed-off-by: John Crispin <john@phrozen.org>
target/linux/ipq40xx/patches-5.4/705-net-add-qualcomm-ar40xx-phy.patch
target/linux/ipq40xx/patches-5.4/706-ar40xx-abort-probe-on-missig-phy.patch [deleted file]

index 083de038a2793b2c15e4d9921bba2787370727a6..648723df0698f6d9d2cb17b8f6b99d2d294f9bd0 100644 (file)
@@ -1,5 +1,7 @@
---- a/drivers/net/phy/Kconfig
-+++ b/drivers/net/phy/Kconfig
+Index: linux-5.4.51/drivers/net/phy/Kconfig
+===================================================================
+--- linux-5.4.51.orig/drivers/net/phy/Kconfig
++++ linux-5.4.51/drivers/net/phy/Kconfig
 @@ -587,6 +587,13 @@ config MDIO_IPQ40XX
          This driver supports the MDIO interface found in Qualcomm
          Atheros ipq40xx Soc chip.
  endif # PHYLIB
  
  config MICREL_KS8995MA
---- a/drivers/net/phy/Makefile
-+++ b/drivers/net/phy/Makefile
+Index: linux-5.4.51/drivers/net/phy/Makefile
+===================================================================
+--- linux-5.4.51.orig/drivers/net/phy/Makefile
++++ linux-5.4.51/drivers/net/phy/Makefile
 @@ -70,6 +70,7 @@ ifdef CONFIG_HWMON
  aquantia-objs                 += aquantia_hwmon.o
  endif
  obj-$(CONFIG_AX88796B_PHY)    += ax88796b.o
  obj-$(CONFIG_AT803X_PHY)      += at803x.o
  obj-$(CONFIG_BCM63XX_PHY)     += bcm63xx.o
+Index: linux-5.4.51/drivers/net/phy/ar40xx.c
+===================================================================
 --- /dev/null
-+++ b/drivers/net/phy/ar40xx.c
-@@ -0,0 +1,2090 @@
++++ linux-5.4.51/drivers/net/phy/ar40xx.c
+@@ -0,0 +1,2097 @@
 +/*
 + * Copyright (c) 2016, The Linux Foundation. All rights reserved.
 + *
 +      /* register switch */
 +      swdev = &priv->dev;
 +
++      if (priv->mii_bus == NULL) {
++              dev_err(&pdev->dev, "Probe failed - Missing PHYs!\n");
++              ret = -ENODEV;
++              goto err_missing_phy;
++      }
++
 +      swdev->alias = dev_name(&priv->mii_bus->dev);
 +
 +      swdev->cpu_port = AR40XX_PORT_CPU;
 +      unregister_switch(&priv->dev);
 +err_unregister_phy:
 +      phy_driver_unregister(&ar40xx_phy_driver);
++err_missing_phy:
 +      platform_set_drvdata(pdev, NULL);
 +      return ret;
 +}
 +
 +MODULE_DESCRIPTION("IPQ40XX ESS driver");
 +MODULE_LICENSE("Dual BSD/GPL");
+Index: linux-5.4.51/drivers/net/phy/ar40xx.h
+===================================================================
 --- /dev/null
-+++ b/drivers/net/phy/ar40xx.h
++++ linux-5.4.51/drivers/net/phy/ar40xx.h
 @@ -0,0 +1,337 @@
 +/*
 + * Copyright (c) 2016, The Linux Foundation. All rights reserved.
diff --git a/target/linux/ipq40xx/patches-5.4/706-ar40xx-abort-probe-on-missig-phy.patch b/target/linux/ipq40xx/patches-5.4/706-ar40xx-abort-probe-on-missig-phy.patch
deleted file mode 100644 (file)
index 19474bf..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/drivers/net/phy/ar40xx.c
-+++ b/drivers/net/phy/ar40xx.c
-@@ -2021,6 +2021,12 @@ static int ar40xx_probe(struct platform_
-       /* register switch */
-       swdev = &priv->dev;
-+      if (priv->mii_bus == NULL) {
-+              dev_err(&pdev->dev, "Probe failed - Missing PHYs!\n");
-+              ret = -ENODEV;
-+              goto err_missing_phy;
-+      }
-+
-       swdev->alias = dev_name(&priv->mii_bus->dev);
-       swdev->cpu_port = AR40XX_PORT_CPU;
-@@ -2052,6 +2058,7 @@ err_unregister_switch:
-       unregister_switch(&priv->dev);
- err_unregister_phy:
-       phy_driver_unregister(&ar40xx_phy_driver);
-+err_missing_phy:
-       platform_set_drvdata(pdev, NULL);
-       return ret;
- }