blob: d1383cc2d12168f16fc902fdd4bc801b8a0ceda3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
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(+)
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index ed4eacef17ce..666803817540 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3015,6 +3015,8 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
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;
--
2.31.1
|