[][kernel][mt7987][eth][Refactor initial function of the xfi_pll and toprgu for the USXGMII/SGMII]
[Description]
Refactor initial function of the xfi_pll and toprgu for the USXGMII/
SGMII.
Without this patch, the ETH driver cannot be brought up because the
SGMII interface does not define xfi_pll and toprgu nodes in the DTS
for the mt7987.
[Release-log]
N/A
Change-Id: I3537e8b20198404933baa49d9a30d791bd5c2ba9
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/9714895
diff --git a/21.02/files/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_sgmii.c b/21.02/files/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_sgmii.c
index 70889af..f33542c 100755
--- a/21.02/files/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_sgmii.c
+++ b/21.02/files/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_sgmii.c
@@ -45,7 +45,7 @@
np = of_parse_phandle(r, "mediatek,xfi_pll", 0);
if (!np)
- return -1;
+ return 0;
ss->pll = syscon_node_to_regmap(np);
if (IS_ERR(ss->pll))
diff --git a/21.02/files/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_usxgmii.c b/21.02/files/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_usxgmii.c
index 3347843..a981b27 100644
--- a/21.02/files/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_usxgmii.c
+++ b/21.02/files/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_usxgmii.c
@@ -41,7 +41,7 @@
np = of_parse_phandle(r, "mediatek,xfi_pll", 0);
if (!np)
- return -1;
+ return 0;
for (i = 0; i < MTK_MAX_DEVS; i++) {
ss->pll = syscon_node_to_regmap(np);
@@ -60,7 +60,7 @@
np = of_parse_phandle(r, "mediatek,toprgu", 0);
if (!np)
- return -1;
+ return 0;
eth->toprgu = syscon_node_to_regmap(np);
if (IS_ERR(eth->toprgu))