Skip to content

Commit dacb58a

Browse files
Kriskura176767gregkh
authored andcommitted
usb: dwc3: qcom: Don't leave BCR asserted
commit ef8abc0ba49ce717e6bc4124e88e59982671f3b5 upstream. Leaving the USB BCR asserted prevents the associated GDSC to turn on. This blocks any subsequent attempts of probing the device, e.g. after a probe deferral, with the following showing in the log: [ 1.332226] usb30_prim_gdsc status stuck at 'off' Leave the BCR deasserted when exiting the driver to avoid this issue. Cc: stable <[email protected]> Fixes: a4333c3 ("usb: dwc3: Add Qualcomm DWC3 glue driver") Acked-by: Thinh Nguyen <[email protected]> Reviewed-by: Konrad Dybcio <[email protected]> Signed-off-by: Krishna Kurapati <[email protected]> Link: https://lore.kernel.org/r/[email protected] [ adapted to individual clock management API instead of bulk clock operations ] Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent af2d67c commit dacb58a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/usb/dwc3/dwc3-qcom.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -856,13 +856,13 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
856856
ret = reset_control_deassert(qcom->resets);
857857
if (ret) {
858858
dev_err(&pdev->dev, "failed to deassert resets, err=%d\n", ret);
859-
goto reset_assert;
859+
return ret;
860860
}
861861

862862
ret = dwc3_qcom_clk_init(qcom, of_clk_get_parent_count(np));
863863
if (ret) {
864864
dev_err(dev, "failed to get clocks\n");
865-
goto reset_assert;
865+
return ret;
866866
}
867867

868868
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -966,8 +966,6 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
966966
clk_disable_unprepare(qcom->clks[i]);
967967
clk_put(qcom->clks[i]);
968968
}
969-
reset_assert:
970-
reset_control_assert(qcom->resets);
971969

972970
return ret;
973971
}
@@ -997,7 +995,6 @@ static int dwc3_qcom_remove(struct platform_device *pdev)
997995
qcom->num_clocks = 0;
998996

999997
dwc3_qcom_interconnect_exit(qcom);
1000-
reset_control_assert(qcom->resets);
1001998

1002999
pm_runtime_allow(dev);
10031000
pm_runtime_disable(dev);

0 commit comments

Comments
 (0)