Skip to content

Commit 75747e2

Browse files
Kriskura176767gregkh
authored andcommitted
usb: dwc3: qcom: Don't leave BCR asserted
commit ef8abc0 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 instead of bulk clock operations ] Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent c45b48b commit 75747e2

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/usb/dwc3/dwc3-qcom.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -763,13 +763,13 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
763763
ret = reset_control_deassert(qcom->resets);
764764
if (ret) {
765765
dev_err(&pdev->dev, "failed to deassert resets, err=%d\n", ret);
766-
goto reset_assert;
766+
return ret;
767767
}
768768

769769
ret = dwc3_qcom_clk_init(qcom, of_clk_get_parent_count(np));
770770
if (ret) {
771771
dev_err_probe(dev, ret, "failed to get clocks\n");
772-
goto reset_assert;
772+
return ret;
773773
}
774774

775775
qcom->qscratch_base = devm_platform_ioremap_resource(pdev, 0);
@@ -835,8 +835,6 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
835835
clk_disable_unprepare(qcom->clks[i]);
836836
clk_put(qcom->clks[i]);
837837
}
838-
reset_assert:
839-
reset_control_assert(qcom->resets);
840838

841839
return ret;
842840
}
@@ -857,8 +855,6 @@ static void dwc3_qcom_remove(struct platform_device *pdev)
857855
qcom->num_clocks = 0;
858856

859857
dwc3_qcom_interconnect_exit(qcom);
860-
reset_control_assert(qcom->resets);
861-
862858
pm_runtime_allow(dev);
863859
pm_runtime_disable(dev);
864860
}

0 commit comments

Comments
 (0)