aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/phy/ti.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-05-15 07:10:52 -0400
committerTom Rini <trini@konsulko.com>2019-05-15 07:10:52 -0400
commit1da6006679fe47e67736f04417eb9dcac944ed4c (patch)
tree68c73b6dd434ba1d089b6280b6bbc2376531eede /drivers/net/phy/ti.c
parent8b1d3d19be6918ed4488fb1157deabc6c6c42481 (diff)
parentebb97ea86878e56daadcc2d5d063ed59a10b5744 (diff)
Merge branch 'master' of git://git.denx.de/u-boot-net
- micrel, ti PHY fixes - rtl8169, mtk-eth fixes
Diffstat (limited to 'drivers/net/phy/ti.c')
-rw-r--r--drivers/net/phy/ti.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/phy/ti.c b/drivers/net/phy/ti.c
index 6ac890a7f5..25f1332ca9 100644
--- a/drivers/net/phy/ti.c
+++ b/drivers/net/phy/ti.c
@@ -138,6 +138,10 @@ static int dp83867_of_init(struct phy_device *phydev)
/* Optional configuration */
+ node = phy_get_ofnode(phydev);
+ if (!ofnode_valid(node))
+ return -EINVAL;
+
/*
* Keep the default value if ti,clk-output-sel is not set
* or to high
@@ -147,10 +151,6 @@ static int dp83867_of_init(struct phy_device *phydev)
ofnode_read_u32_default(node, "ti,clk-output-sel",
DP83867_CLK_O_SEL_REF_CLK);
- node = phy_get_ofnode(phydev);
- if (!ofnode_valid(node))
- return -EINVAL;
-
if (ofnode_read_bool(node, "ti,max-output-impedance"))
dp83867->io_impedance = DP83867_IO_MUX_CFG_IO_IMPEDANCE_MAX;
else if (ofnode_read_bool(node, "ti,min-output-impedance"))