diff mbox series

[RESEND] phy: exynos5-usbdrd: Calibrating makes sense only for USB2.0 PHY

Message ID 20191213083157.9220-1-m.szyprowski@samsung.com (mailing list archive)
State Not Applicable
Headers show
Series [RESEND] phy: exynos5-usbdrd: Calibrating makes sense only for USB2.0 PHY | expand

Commit Message

Marek Szyprowski Dec. 13, 2019, 8:31 a.m. UTC
PHY calibration is needed only for USB2.0 (UTMI) PHY, so skip calling
calibration code when phy_calibrate() is called for USB3.0 (PIPE3) PHY.

Fixes: d8c80bb3b55b ("phy: exynos5-usbdrd: Calibrate LOS levels for exynos5420/5800")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/phy/samsung/phy-exynos5-usbdrd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Marek Szyprowski Jan. 13, 2020, 2:02 p.m. UTC | #1
On 13.12.2019 09:31, Marek Szyprowski wrote:
> PHY calibration is needed only for USB2.0 (UTMI) PHY, so skip calling
> calibration code when phy_calibrate() is called for USB3.0 (PIPE3) PHY.
>
> Fixes: d8c80bb3b55b ("phy: exynos5-usbdrd: Calibrate LOS levels for exynos5420/5800")
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

gentle ping

> ---
>   drivers/phy/samsung/phy-exynos5-usbdrd.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/phy/samsung/phy-exynos5-usbdrd.c b/drivers/phy/samsung/phy-exynos5-usbdrd.c
> index 646259bee909..f07edd80d2f3 100644
> --- a/drivers/phy/samsung/phy-exynos5-usbdrd.c
> +++ b/drivers/phy/samsung/phy-exynos5-usbdrd.c
> @@ -714,7 +714,9 @@ static int exynos5_usbdrd_phy_calibrate(struct phy *phy)
>   	struct phy_usb_instance *inst = phy_get_drvdata(phy);
>   	struct exynos5_usbdrd_phy *phy_drd = to_usbdrd_phy(inst);
>   
> -	return exynos5420_usbdrd_phy_calibrate(phy_drd);
> +	if (inst->phy_cfg->id == EXYNOS5_DRDPHY_UTMI)
> +		return exynos5420_usbdrd_phy_calibrate(phy_drd);
> +	return 0;
>   }
>   
>   static const struct phy_ops exynos5_usbdrd_phy_ops = {

Best regards
diff mbox series

Patch

diff --git a/drivers/phy/samsung/phy-exynos5-usbdrd.c b/drivers/phy/samsung/phy-exynos5-usbdrd.c
index 646259bee909..f07edd80d2f3 100644
--- a/drivers/phy/samsung/phy-exynos5-usbdrd.c
+++ b/drivers/phy/samsung/phy-exynos5-usbdrd.c
@@ -714,7 +714,9 @@  static int exynos5_usbdrd_phy_calibrate(struct phy *phy)
 	struct phy_usb_instance *inst = phy_get_drvdata(phy);
 	struct exynos5_usbdrd_phy *phy_drd = to_usbdrd_phy(inst);
 
-	return exynos5420_usbdrd_phy_calibrate(phy_drd);
+	if (inst->phy_cfg->id == EXYNOS5_DRDPHY_UTMI)
+		return exynos5420_usbdrd_phy_calibrate(phy_drd);
+	return 0;
 }
 
 static const struct phy_ops exynos5_usbdrd_phy_ops = {