aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/hack-5.10
diff options
context:
space:
mode:
authorAnsuel Smith <ansuelsmth@gmail.com>2021-07-23 20:19:43 +0200
committerDavid Bauer <mail@david-bauer.net>2021-08-05 01:46:26 +0200
commit91a52f22a13d768f5b16a2fd0e1d74ffe36f9cb1 (patch)
treef28017e5a42615c51b599d6de96c9fb91d27d476 /target/linux/generic/hack-5.10
parentedb6bc199049769be76bb3966debcc2b31511e4b (diff)
downloadupstream-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/generic/hack-5.10')
-rw-r--r--target/linux/generic/hack-5.10/780-drivers-net-mediatek-register-of_platform-for-every-.patch27
-rw-r--r--target/linux/generic/hack-5.10/781-dsa-register-every-port-with-of_platform.patch35
2 files changed, 0 insertions, 62 deletions
diff --git a/target/linux/generic/hack-5.10/780-drivers-net-mediatek-register-of_platform-for-every-.patch b/target/linux/generic/hack-5.10/780-drivers-net-mediatek-register-of_platform-for-every-.patch
deleted file mode 100644
index fa80b0e5f7..0000000000
--- a/target/linux/generic/hack-5.10/780-drivers-net-mediatek-register-of_platform-for-every-.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From c94b2cfd25c282e2974accc1b07da98ae7139b47 Mon Sep 17 00:00:00 2001
-From: Ansuel Smith <ansuelsmth@gmail.com>
-Date: Fri, 23 Jul 2021 12:14:33 +0200
-Subject: [PATCH 1/2] drivers: net: mediatek: register of_platform for every
- port
-
-Currently the nvmem framework require the devicenode to be registred on
-the of_platform or of_get_mac_address fail to get the macaddress if
-defined using an nvmem cell. Fix this by registrering these special node
-so they can be found by of_find_device_by_node.
-
-Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
----
- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -3005,6 +3005,8 @@ static int mtk_add_mac(struct mtk_eth *e
- eth->netdev[id]->dev.of_node = np;
-
- eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH - MTK_RX_ETH_HLEN;
-+
-+ of_platform_device_create(np, NULL, NULL);
-
- return 0;
-
diff --git a/target/linux/generic/hack-5.10/781-dsa-register-every-port-with-of_platform.patch b/target/linux/generic/hack-5.10/781-dsa-register-every-port-with-of_platform.patch
deleted file mode 100644
index 330d9f1f80..0000000000
--- a/target/linux/generic/hack-5.10/781-dsa-register-every-port-with-of_platform.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 8bab551f44204fc5d43977063cd704112c17c750 Mon Sep 17 00:00:00 2001
-From: Ansuel Smith <ansuelsmth@gmail.com>
-Date: Fri, 23 Jul 2021 12:17:27 +0200
-Subject: [PATCH 2/2] dsa: register every port with of_platform
-
-The declaration of a different mac-addr using the nvmem framework is
-currently broken. The dsa code use the generic of_get_mac_address where
-the nvmem function require the device node to be registred in the
-of_platform to be found by of_find_device_by_node. Register every port
-in the of_platform so they can corrently found and a custom mac-addr can
-correctly be declared using a nvmem-cell declared in the dts.
-
-Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
----
- net/dsa/dsa2.c | 2 +
- 1 file changed, 2 insertion(+)
-
---- a/net/dsa/dsa2.c
-+++ b/net/dsa/dsa2.c
-@@ -14,6 +14,7 @@
- #include <linux/rtnetlink.h>
- #include <linux/of.h>
- #include <linux/of_net.h>
-+#include <linux/of_platform.h>
- #include <net/devlink.h>
-
- #include "dsa_priv.h"
-@@ -288,6 +289,7 @@ static int dsa_port_setup(struct dsa_por
-
- break;
- case DSA_PORT_TYPE_USER:
-+ of_platform_device_create(dp->dn, NULL, NULL);
- dp->mac = of_get_mac_address(dp->dn);
- err = dsa_slave_create(dp);
- if (err)