[U-Boot] [PATCH 2/5] net: phy: dp83867: switch to use phy_get_ofnode()
Grygorii Strashko
grygorii.strashko at ti.com
Thu Jun 28 19:47:52 UTC 2018
Use PHY API phy_get_ofnode() helper to get PHY DT node.
Signed-off-by: Grygorii Strashko <grygorii.strashko at ti.com>
---
drivers/net/phy/ti.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/ti.c b/drivers/net/phy/ti.c
index 98c36ab..d4a7e39 100644
--- a/drivers/net/phy/ti.c
+++ b/drivers/net/phy/ti.c
@@ -172,8 +172,11 @@ void phy_write_mmd_indirect(struct phy_device *phydev, int prtad,
static int dp83867_of_init(struct phy_device *phydev)
{
struct dp83867_private *dp83867 = phydev->priv;
- struct udevice *dev = phydev->dev;
- ofnode node = dev_ofnode(dev);
+ ofnode node;
+
+ 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;
--
2.10.5
More information about the U-Boot
mailing list