[PATCH v4 04/14] net: mediatek: handle alternative name for pn_swap property

Christian Marangi ansuelsmth at gmail.com
Mon Jun 24 23:03:30 CEST 2024


Handle alternative name for pn_swap property as upstream linux use
mediatek,pnswap.

Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 drivers/net/mtk_eth.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mtk_eth.c b/drivers/net/mtk_eth.c
index 94f17a97fe0..5098afef8a8 100644
--- a/drivers/net/mtk_eth.c
+++ b/drivers/net/mtk_eth.c
@@ -1964,7 +1964,9 @@ static int mtk_eth_of_to_plat(struct udevice *dev)
 			return -ENODEV;
 		}
 
-		priv->pn_swap = ofnode_read_bool(args.node, "pn_swap");
+		/* Upstream linux use mediatek,pnswap instead of pn_swap */
+		priv->pn_swap = ofnode_read_bool(args.node, "pn_swap") ||
+				ofnode_read_bool(args.node, "mediatek,pnswap");
 	} else if (priv->phy_interface == PHY_INTERFACE_MODE_USXGMII) {
 		/* get corresponding usxgmii phandle */
 		ret = dev_read_phandle_with_args(dev, "mediatek,usxgmiisys",
-- 
2.45.1



More information about the U-Boot mailing list