| From 698ada73265453c25af1a45928dc9d22c28ced8a Mon Sep 17 00:00:00 2001 |
| From: Sasha Levin <sashal@kernel.org> |
| Date: Wed, 8 Jul 2020 15:38:00 +0200 |
| Subject: phy: exynos5-usbdrd: Calibrating makes sense only for USB2.0 PHY |
| |
| From: Marek Szyprowski <m.szyprowski@samsung.com> |
| |
| [ Upstream commit dcbabfeb17c3c2fdb6bc92a3031ecd37df1834a8 ] |
| |
| 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> |
| Acked-by: Krzysztof Kozlowski <krzk@kernel.org> |
| Link: https://lore.kernel.org/r/20200708133800.3336-1-m.szyprowski@samsung.com |
| Signed-off-by: Vinod Koul <vkoul@kernel.org> |
| Signed-off-by: Sasha Levin <sashal@kernel.org> |
| --- |
| 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 e510732afb8b0..7f6279fb4f8fa 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 = { |
| -- |
| 2.25.1 |
| |