diff options
author | Mathias Kresin <dev@kresin.me> | 2020-03-01 08:09:19 +0100 |
---|---|---|
committer | Mathias Kresin <dev@kresin.me> | 2020-03-16 22:28:16 +0100 |
commit | 005dedd3480f47ff1049e132ec8d83bc0e24fbef (patch) | |
tree | 56fdc5bdf6c715d63fc5acb963eab4e747747920 /target/linux/lantiq/patches-5.4/0701-NET-lantiq-etop-of-mido.patch | |
parent | 0dbe8b9029df1c1b254101bacbc20c3418eb956f (diff) | |
download | upstream-005dedd3480f47ff1049e132ec8d83bc0e24fbef.tar.gz upstream-005dedd3480f47ff1049e132ec8d83bc0e24fbef.tar.bz2 upstream-005dedd3480f47ff1049e132ec8d83bc0e24fbef.zip |
lantiq: copy target to kernel 5.4
Duplicate kernel 4.19 config and patches for kernel 5.4.
Duplicate the devicetree source files as well, they need kernel 5.4
specific adjustments.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux/lantiq/patches-5.4/0701-NET-lantiq-etop-of-mido.patch')
-rw-r--r-- | target/linux/lantiq/patches-5.4/0701-NET-lantiq-etop-of-mido.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/target/linux/lantiq/patches-5.4/0701-NET-lantiq-etop-of-mido.patch b/target/linux/lantiq/patches-5.4/0701-NET-lantiq-etop-of-mido.patch new file mode 100644 index 0000000000..05e4ec8328 --- /dev/null +++ b/target/linux/lantiq/patches-5.4/0701-NET-lantiq-etop-of-mido.patch @@ -0,0 +1,37 @@ +--- a/drivers/net/ethernet/lantiq_etop.c ++++ b/drivers/net/ethernet/lantiq_etop.c +@@ -40,6 +40,7 @@ + #include <linux/of_net.h> + #include <linux/of_irq.h> + #include <linux/of_platform.h> ++#include <linux/of_mdio.h> + + #include <asm/checksum.h> + +@@ -571,7 +572,8 @@ static int + ltq_etop_mdio_init(struct net_device *dev) + { + struct ltq_etop_priv *priv = netdev_priv(dev); +- int err; ++ struct device_node *mdio_np = NULL; ++ int err, ret; + + priv->mii_bus = mdiobus_alloc(); + if (!priv->mii_bus) { +@@ -591,7 +593,15 @@ ltq_etop_mdio_init(struct net_device *de + priv->mii_bus->name = "ltq_mii"; + snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x", + priv->pdev->name, priv->pdev->id); +- if (mdiobus_register(priv->mii_bus)) { ++ ++ mdio_np = of_get_child_by_name(priv->pdev->dev.of_node, "mdio-bus"); ++ ++ if (mdio_np) ++ ret = of_mdiobus_register(priv->mii_bus, mdio_np); ++ else ++ ret = mdiobus_register(priv->mii_bus); ++ ++ if (ret) { + err = -ENXIO; + goto err_out_free_mdiobus; + } |