]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: mediatek: handle alternative name for pn_swap property
authorChristian Marangi <ansuelsmth@gmail.com>
Mon, 24 Jun 2024 21:03:30 +0000 (23:03 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 8 Jul 2024 17:45:50 +0000 (11:45 -0600)
Handle alternative name for pn_swap property as upstream linux use
mediatek,pnswap.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
drivers/net/mtk_eth.c

index 94f17a97fe0f54ebd6ede1db280fe322daf41987..5098afef8a874b79b32b262cabf772e814654af4 100644 (file)
@@ -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",