mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
net: phy: Handle reset-delay-us/reset-post-delay-us properties
These two properties are used by various DTs in place of current reset-assert-us/reset-deassert-us , handle both . Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
This commit is contained in:
parent
68a4d15061
commit
3015ae5feb
1 changed files with 8 additions and 0 deletions
|
@ -144,6 +144,14 @@ static int eth_phy_of_to_plat(struct udevice *dev)
|
|||
uc_priv->reset_assert_delay = dev_read_u32_default(dev, "reset-assert-us", 0);
|
||||
uc_priv->reset_deassert_delay = dev_read_u32_default(dev, "reset-deassert-us", 0);
|
||||
|
||||
/* These are used by some DTs, try these as a fallback. */
|
||||
if (!uc_priv->reset_assert_delay && !uc_priv->reset_deassert_delay) {
|
||||
uc_priv->reset_assert_delay =
|
||||
dev_read_u32_default(dev, "reset-delay-us", 0);
|
||||
uc_priv->reset_deassert_delay =
|
||||
dev_read_u32_default(dev, "reset-post-delay-us", 0);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue