summaryrefslogtreecommitdiff
path: root/drivers/phy/broadcom/phy-brcm-usb.c
diff options
context:
space:
mode:
authorAl Cooper <alcooperx@gmail.com>2020-01-03 13:18:07 -0500
committerKishon Vijay Abraham I <kishon@ti.com>2020-01-08 12:58:06 +0530
commit89927fe0061aaa69b39e95ed793d2c61903b7895 (patch)
treea24ec2fac57886b36ce46ac28a0352b5bf3c9bf8 /drivers/phy/broadcom/phy-brcm-usb.c
parent9d5f51dcdb646c2ed21649d379fbb703994f1ec9 (diff)
phy: usb: fix driver to defer on clk_get defer
Handle defer on clk_get because the new SCMI clock driver comes up after this driver. Signed-off-by: Al Cooper <alcooperx@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'drivers/phy/broadcom/phy-brcm-usb.c')
-rw-r--r--drivers/phy/broadcom/phy-brcm-usb.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/phy/broadcom/phy-brcm-usb.c b/drivers/phy/broadcom/phy-brcm-usb.c
index 5f7bfa09494d..c82d7ec15334 100644
--- a/drivers/phy/broadcom/phy-brcm-usb.c
+++ b/drivers/phy/broadcom/phy-brcm-usb.c
@@ -341,6 +341,8 @@ static int brcm_usb_phy_dvr_init(struct platform_device *pdev,
priv->usb_20_clk = of_clk_get_by_name(dn, "sw_usb");
if (IS_ERR(priv->usb_20_clk)) {
+ if (PTR_ERR(priv->usb_20_clk) == -EPROBE_DEFER)
+ return -EPROBE_DEFER;
dev_info(dev, "Clock not found in Device Tree\n");
priv->usb_20_clk = NULL;
}
@@ -371,6 +373,8 @@ static int brcm_usb_phy_dvr_init(struct platform_device *pdev,
priv->usb_30_clk = of_clk_get_by_name(dn, "sw_usb3");
if (IS_ERR(priv->usb_30_clk)) {
+ if (PTR_ERR(priv->usb_30_clk) == -EPROBE_DEFER)
+ return -EPROBE_DEFER;
dev_info(dev,
"USB3.0 clock not found in Device Tree\n");
priv->usb_30_clk = NULL;
@@ -382,6 +386,8 @@ static int brcm_usb_phy_dvr_init(struct platform_device *pdev,
priv->suspend_clk = clk_get(dev, "usb0_freerun");
if (IS_ERR(priv->suspend_clk)) {
+ if (PTR_ERR(priv->suspend_clk) == -EPROBE_DEFER)
+ return -EPROBE_DEFER;
dev_err(dev, "Suspend Clock not found in Device Tree\n");
priv->suspend_clk = NULL;
}