diff options
author | Bruno Thomsen <bruno.thomsen@gmail.com> | 2020-07-30 22:57:48 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-08-04 01:01:02 +0300 |
commit | bb3831294cd50750806f2ce8d73317dc8feeda09 (patch) | |
tree | b1954b61b77d4b8ed1a001a58609941317e9f712 /drivers/of/of_mdio.c | |
parent | 6259e0f5478d7a7e4ff3e38bc739b612b8907246 (diff) | |
download | linux-bb3831294cd50750806f2ce8d73317dc8feeda09.tar.xz |
net: mdiobus: add reset-post-delay-us handling
Load new "reset-post-delay-us" value from MDIO properties,
and if configured to a greater then zero delay do a
flexible sleeping delay after MDIO bus reset deassert.
This allows devices to exit reset state before start
bus communication.
Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/of/of_mdio.c')
-rw-r--r-- | drivers/of/of_mdio.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c index eb84507de28a..cb32d7ef4938 100644 --- a/drivers/of/of_mdio.c +++ b/drivers/of/of_mdio.c @@ -268,6 +268,8 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) /* Get bus level PHY reset GPIO details */ mdio->reset_delay_us = DEFAULT_GPIO_RESET_DELAY; of_property_read_u32(np, "reset-delay-us", &mdio->reset_delay_us); + mdio->reset_post_delay_us = 0; + of_property_read_u32(np, "reset-post-delay-us", &mdio->reset_post_delay_us); /* Register the MDIO bus */ rc = mdiobus_register(mdio); |