aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini2022-03-01 07:48:39 -0500
committerTom Rini2022-03-01 07:48:39 -0500
commitf64aac4a69007771963eaa52a86e733071f9fdd4 (patch)
treedf00fa86fd63286923b1b1ab1b05cd1408ef3d7d
parentf9a719e2954473f9be1f8c14a28288f943a00dd2 (diff)
parenta41b88ec02ea1dbf4e5e6e895625a5fee96097c5 (diff)
Merge https://source.denx.de/u-boot/custodians/u-boot-usb
-rw-r--r--drivers/phy/nop-phy.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/phy/nop-phy.c b/drivers/phy/nop-phy.c
index e2ee6e92068..d0904f4f075 100644
--- a/drivers/phy/nop-phy.c
+++ b/drivers/phy/nop-phy.c
@@ -45,11 +45,13 @@ static int nop_phy_init(struct phy *phy)
#if CONFIG_IS_ENABLED(DM_GPIO)
/* Take phy out of reset */
- ret = dm_gpio_set_value(&priv->reset_gpio, false);
- if (ret) {
- if (CONFIG_IS_ENABLED(CLK))
- clk_disable_bulk(&priv->bulk);
- return ret;
+ if (dm_gpio_is_valid(&priv->reset_gpio)) {
+ ret = dm_gpio_set_value(&priv->reset_gpio, false);
+ if (ret) {
+ if (CONFIG_IS_ENABLED(CLK))
+ clk_disable_bulk(&priv->bulk);
+ return ret;
+ }
}
#endif
return 0;