diff options
author | Ansuel Smith <ansuelsmth@gmail.com> | 2021-07-23 20:19:43 +0200 |
---|---|---|
committer | David Bauer <mail@david-bauer.net> | 2021-08-05 01:46:26 +0200 |
commit | 91a52f22a13d768f5b16a2fd0e1d74ffe36f9cb1 (patch) | |
tree | f28017e5a42615c51b599d6de96c9fb91d27d476 /target/linux/lantiq | |
parent | edb6bc199049769be76bb3966debcc2b31511e4b (diff) | |
download | upstream-91a52f22a13d768f5b16a2fd0e1d74ffe36f9cb1.tar.gz upstream-91a52f22a13d768f5b16a2fd0e1d74ffe36f9cb1.tar.bz2 upstream-91a52f22a13d768f5b16a2fd0e1d74ffe36f9cb1.zip |
treewide: backport support for nvmem on non platform devices
In the current state, nvmem cells are only detected on platform device.
To quickly fix the problem, we register the affected problematic driver
with the of_platform but that is more an hack than a real solution.
Backport from net-next the required patch so that nvmem can work also
with non-platform devices and rework our current patch.
Drop the mediatek and dsa workaround and rework the ath10k patches.
Rework every driver that use the of_get_mac_address api.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Diffstat (limited to 'target/linux/lantiq')
-rw-r--r-- | target/linux/lantiq/patches-5.10/0028-NET-lantiq-various-etop-fixes.patch | 9 | ||||
-rw-r--r-- | target/linux/lantiq/patches-5.4/0028-NET-lantiq-various-etop-fixes.patch | 9 |
2 files changed, 6 insertions, 12 deletions
diff --git a/target/linux/lantiq/patches-5.10/0028-NET-lantiq-various-etop-fixes.patch b/target/linux/lantiq/patches-5.10/0028-NET-lantiq-various-etop-fixes.patch index 441aaed05b..0a42fd59e4 100644 --- a/target/linux/lantiq/patches-5.10/0028-NET-lantiq-various-etop-fixes.patch +++ b/target/linux/lantiq/patches-5.10/0028-NET-lantiq-various-etop-fixes.patch @@ -721,7 +721,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> netif_trans_update(dev); netif_wake_queue(dev); return; -@@ -618,14 +822,19 @@ static const struct net_device_ops ltq_e +@@ -618,14 +822,18 @@ static const struct net_device_ops ltq_e .ndo_tx_timeout = ltq_etop_tx_timeout, }; @@ -733,7 +733,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org> struct ltq_etop_priv *priv; - struct resource *res; + struct resource *res, *gbit_res, irqres[2]; -+ const u8 *mac; int err; - int i; + @@ -745,7 +744,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!res) { -@@ -651,31 +860,64 @@ ltq_etop_probe(struct platform_device *p +@@ -651,31 +860,62 @@ ltq_etop_probe(struct platform_device *p goto err_out; } @@ -785,9 +784,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> + if (err) + pr_err("Can't find phy-mode for port\n"); + -+ mac = of_get_mac_address(pdev->dev.of_node); -+ if (mac) -+ memcpy(priv->mac, mac, ETH_ALEN); ++ of_get_mac_address(pdev->dev.of_node, priv->mac); + + priv->clk_ppe = clk_get(&pdev->dev, NULL); + if (IS_ERR(priv->clk_ppe)) diff --git a/target/linux/lantiq/patches-5.4/0028-NET-lantiq-various-etop-fixes.patch b/target/linux/lantiq/patches-5.4/0028-NET-lantiq-various-etop-fixes.patch index 094496a16d..12a71fdad1 100644 --- a/target/linux/lantiq/patches-5.4/0028-NET-lantiq-various-etop-fixes.patch +++ b/target/linux/lantiq/patches-5.4/0028-NET-lantiq-various-etop-fixes.patch @@ -721,7 +721,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> netif_trans_update(dev); netif_wake_queue(dev); return; -@@ -625,14 +829,19 @@ static const struct net_device_ops ltq_e +@@ -625,14 +829,18 @@ static const struct net_device_ops ltq_e .ndo_tx_timeout = ltq_etop_tx_timeout, }; @@ -733,7 +733,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org> struct ltq_etop_priv *priv; - struct resource *res; + struct resource *res, *gbit_res, irqres[2]; -+ const u8 *mac; int err; - int i; + @@ -745,7 +744,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!res) { -@@ -658,31 +867,62 @@ ltq_etop_probe(struct platform_device *p +@@ -658,31 +867,60 @@ ltq_etop_probe(struct platform_device *p goto err_out; } @@ -783,9 +782,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> + priv->rx_irq = irqres[1].start; + priv->mii_mode = of_get_phy_mode(pdev->dev.of_node); + -+ mac = of_get_mac_address(pdev->dev.of_node); -+ if (mac) -+ memcpy(priv->mac, mac, ETH_ALEN); ++ of_get_mac_address(pdev->dev.of_node, priv->mac); + + priv->clk_ppe = clk_get(&pdev->dev, NULL); + if (IS_ERR(priv->clk_ppe)) |