diff options
author | Tom Rini <trini@konsulko.com> | 2022-04-15 08:09:52 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-04-15 08:10:32 -0400 |
commit | 7f418ea59852945eeb9e5d2555d306f09643d555 (patch) | |
tree | 069dbaf3a1f62b68251189e9acdbd9affcbd98c5 /drivers/net/phy/dp83867.c | |
parent | 239fe55a6ce516f329687c0680428ca2acfc73ca (diff) | |
parent | 0154e6de37e8bbaac837939391f6d4a8f0b3fd18 (diff) | |
download | u-boot-7f418ea59852945eeb9e5d2555d306f09643d555.tar.gz |
Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-net
- DM9000 DM support
- tftp server bug fix
- mdio ofnode support functions
- Various phy fixes and improvements.
[trini: Fixup merge conflicts in drivers/net/phy/ethernet_id.c
drivers/net/phy/phy.c include/phy.h]
Diffstat (limited to 'drivers/net/phy/dp83867.c')
-rw-r--r-- | drivers/net/phy/dp83867.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c index eada4541c9..3d862636b6 100644 --- a/drivers/net/phy/dp83867.c +++ b/drivers/net/phy/dp83867.c @@ -158,7 +158,7 @@ static int dp83867_of_init(struct phy_device *phydev) node = phy_get_ofnode(phydev); if (!ofnode_valid(node)) - return -EINVAL; + return 0; /* Optional configuration */ ret = ofnode_read_u32(node, "ti,clk-output-sel", @@ -266,7 +266,7 @@ static int dp83867_of_init(struct phy_device *phydev) static int dp83867_config(struct phy_device *phydev) { struct dp83867_private *dp83867; - unsigned int val, delay, cfg2; + int val, delay, cfg2; int ret, bs; dp83867 = (struct dp83867_private *)phydev->priv; @@ -291,8 +291,11 @@ static int dp83867_config(struct phy_device *phydev) if (phy_interface_is_rgmii(phydev)) { val = phy_read(phydev, MDIO_DEVAD_NONE, MII_DP83867_PHYCTRL); - if (val < 0) + if (val < 0) { + ret = val; goto err_out; + } + val &= ~DP83867_PHYCR_FIFO_DEPTH_MASK; val |= (dp83867->fifo_depth << DP83867_PHYCR_FIFO_DEPTH_SHIFT); |