|
@@ -125,9 +125,11 @@ static int __dwc2_lowlevel_hw_enable(struct dwc2_hsotg *hsotg)
|
|
|
if (ret)
|
|
|
return ret;
|
|
|
|
|
|
- ret = clk_prepare_enable(hsotg->clk);
|
|
|
- if (ret)
|
|
|
- return ret;
|
|
|
+ if (hsotg->clk) {
|
|
|
+ ret = clk_prepare_enable(hsotg->clk);
|
|
|
+ if (ret)
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
|
|
|
if (hsotg->uphy)
|
|
|
ret = usb_phy_init(hsotg->uphy);
|
|
@@ -175,7 +177,8 @@ static int __dwc2_lowlevel_hw_disable(struct dwc2_hsotg *hsotg)
|
|
|
if (ret)
|
|
|
return ret;
|
|
|
|
|
|
- clk_disable_unprepare(hsotg->clk);
|
|
|
+ if (hsotg->clk)
|
|
|
+ clk_disable_unprepare(hsotg->clk);
|
|
|
|
|
|
ret = regulator_bulk_disable(ARRAY_SIZE(hsotg->supplies),
|
|
|
hsotg->supplies);
|