mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
phy: rockchip: usbdp: Handle rk_udphy_reset_deassert errors
Handle rk_udphy_reset_deassert returning errors to avoid theoretical
(Rockchip reset controller driver does not return errors) SError.
Fixes: 2f70bbddeb ("phy: rockchip: add usbdp combo phy driver")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/message/20260626211151.2332F1F000E9%40smtp.kernel.org
Tested-by: Igor Paunovic <royalnet026@gmail.com> # Orange Pi 5 Plus
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260915-rockchip-usbdp-cleanup-part2-v15-10-8d507cb1174f@collabora.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
cf3aa34e6f
commit
35101e2f49
|
|
@ -802,8 +802,12 @@ static int rk_udphy_init(struct rk_udphy *udphy)
|
|||
/* Step 1: power on pma and deassert apb rstn */
|
||||
rk_udphy_grfreg_write(udphy->udphygrf, &cfg->grfcfg.low_pwrn, true);
|
||||
|
||||
rk_udphy_reset_deassert(udphy, "pma_apb");
|
||||
rk_udphy_reset_deassert(udphy, "pcs_apb");
|
||||
ret = rk_udphy_reset_deassert(udphy, "pma_apb");
|
||||
if (ret)
|
||||
goto assert_resets;
|
||||
ret = rk_udphy_reset_deassert(udphy, "pcs_apb");
|
||||
if (ret)
|
||||
goto assert_resets;
|
||||
|
||||
/* Step 2: set init sequence and phy refclk */
|
||||
ret = regmap_multi_reg_write(udphy->pma_regmap, rk_udphy_init_sequence,
|
||||
|
|
@ -829,8 +833,11 @@ static int rk_udphy_init(struct rk_udphy *udphy)
|
|||
FIELD_PREP(CMN_DP_LANE_EN_ALL, 0));
|
||||
|
||||
/* Step 4: deassert init rstn and wait for 200ns from datasheet */
|
||||
if (udphy->mode & UDPHY_MODE_USB)
|
||||
rk_udphy_reset_deassert(udphy, "init");
|
||||
if (udphy->mode & UDPHY_MODE_USB) {
|
||||
ret = rk_udphy_reset_deassert(udphy, "init");
|
||||
if (ret)
|
||||
goto assert_resets;
|
||||
}
|
||||
|
||||
if (udphy->mode & UDPHY_MODE_DP) {
|
||||
regmap_update_bits(udphy->pma_regmap, CMN_DP_RSTN_OFFSET,
|
||||
|
|
@ -842,8 +849,14 @@ static int rk_udphy_init(struct rk_udphy *udphy)
|
|||
|
||||
/* Step 5: deassert cmn/lane rstn */
|
||||
if (udphy->mode & UDPHY_MODE_USB) {
|
||||
rk_udphy_reset_deassert(udphy, "cmn");
|
||||
rk_udphy_reset_deassert(udphy, "lane");
|
||||
ret = rk_udphy_reset_deassert(udphy, "cmn");
|
||||
if (ret)
|
||||
goto assert_resets;
|
||||
|
||||
ret = rk_udphy_reset_deassert(udphy, "lane");
|
||||
if (ret)
|
||||
goto assert_resets;
|
||||
|
||||
}
|
||||
|
||||
/* Step 6: wait for lock done of pll */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user