Skip to content

Commit a7abf50

Browse files
clamor-sgregkh
authored andcommitted
usb: phy: tegra: return error value from utmi_wait_register
Return exact error value from utmi_wait_register during HSIC power on. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> Link: https://patch.msgid.link/20260202080526.23487-3-clamor95@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent aacad39 commit a7abf50

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

drivers/usb/phy/phy-tegra-usb.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,7 @@ static int uhsic_phy_power_on(struct tegra_usb_phy *phy)
891891
struct tegra_utmip_config *config = phy->config;
892892
void __iomem *base = phy->regs;
893893
u32 val;
894+
int err = 0;
894895

895896
val = tegra_hsic_readl(phy, UHSIC_PADS_CFG1);
896897
val &= ~(UHSIC_PD_BG | UHSIC_PD_TX | UHSIC_PD_TRK | UHSIC_PD_RX |
@@ -984,12 +985,14 @@ static int uhsic_phy_power_on(struct tegra_usb_phy *phy)
984985
val |= UHSIC_TX_RTUNE(phy->soc_config->uhsic_tx_rtune);
985986
tegra_hsic_writel(phy, UHSIC_PADS_CFG0, val);
986987

987-
if (utmi_wait_register(base + USB_SUSP_CTRL, USB_PHY_CLK_VALID,
988-
USB_PHY_CLK_VALID))
988+
err = utmi_wait_register(base + USB_SUSP_CTRL, USB_PHY_CLK_VALID,
989+
USB_PHY_CLK_VALID);
990+
991+
if (err)
989992
dev_err(phy->u_phy.dev,
990993
"Timeout waiting for PHY to stabilize on enable (HSIC)\n");
991994

992-
return 0;
995+
return err;
993996
}
994997

995998
static int uhsic_phy_power_off(struct tegra_usb_phy *phy)

0 commit comments

Comments
 (0)