Skip to content

Commit a6498d5

Browse files
aouledameurgregkh
authored andcommitted
Revert "usb: dwc3: meson-g12a: fix shared reset control use"
This reverts commit 7a41095. This commit breaks USB on meson-gxl-s905x-libretech-cc. Reverting the change solves the issue. In fact, according to the reset framework code, consumers must not use reset_control_(de)assert() on shared reset lines when reset_control_reset has been used, and vice-versa. Moreover, with this commit, usb is not guaranted to be reset since the reset is likely to be initially deasserted. Reverting the commit will bring back the suspend warning mentioned in the commit description. Nevertheless, a warning is much less critical than breaking dwc3-meson-g12a USB completely. We will address the warning issue in another way as a 2nd step. Fixes: 7a41095 ("usb: dwc3: meson-g12a: fix shared reset control use") Cc: stable <[email protected]> Signed-off-by: Amjad Ouled-Ameur <[email protected]> Reported-by: Jerome Brunet <[email protected]> Acked-by: Neil Armstrong <[email protected]> Acked-by: Philipp Zabel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 1f3546f commit a6498d5

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

drivers/usb/dwc3/dwc3-meson-g12a.c

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -737,13 +737,13 @@ static int dwc3_meson_g12a_probe(struct platform_device *pdev)
737737
goto err_disable_clks;
738738
}
739739

740-
ret = reset_control_deassert(priv->reset);
740+
ret = reset_control_reset(priv->reset);
741741
if (ret)
742-
goto err_assert_reset;
742+
goto err_disable_clks;
743743

744744
ret = dwc3_meson_g12a_get_phys(priv);
745745
if (ret)
746-
goto err_assert_reset;
746+
goto err_disable_clks;
747747

748748
ret = priv->drvdata->setup_regmaps(priv, base);
749749
if (ret)
@@ -752,7 +752,7 @@ static int dwc3_meson_g12a_probe(struct platform_device *pdev)
752752
if (priv->vbus) {
753753
ret = regulator_enable(priv->vbus);
754754
if (ret)
755-
goto err_assert_reset;
755+
goto err_disable_clks;
756756
}
757757

758758
/* Get dr_mode */
@@ -765,13 +765,13 @@ static int dwc3_meson_g12a_probe(struct platform_device *pdev)
765765

766766
ret = priv->drvdata->usb_init(priv);
767767
if (ret)
768-
goto err_assert_reset;
768+
goto err_disable_clks;
769769

770770
/* Init PHYs */
771771
for (i = 0 ; i < PHY_COUNT ; ++i) {
772772
ret = phy_init(priv->phys[i]);
773773
if (ret)
774-
goto err_assert_reset;
774+
goto err_disable_clks;
775775
}
776776

777777
/* Set PHY Power */
@@ -809,9 +809,6 @@ static int dwc3_meson_g12a_probe(struct platform_device *pdev)
809809
for (i = 0 ; i < PHY_COUNT ; ++i)
810810
phy_exit(priv->phys[i]);
811811

812-
err_assert_reset:
813-
reset_control_assert(priv->reset);
814-
815812
err_disable_clks:
816813
clk_bulk_disable_unprepare(priv->drvdata->num_clks,
817814
priv->drvdata->clks);

0 commit comments

Comments
 (0)