summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChanho Park <chanho61.park@samsung.com>2022-07-06 11:02:55 +0900
committerMartin K. Petersen <martin.petersen@oracle.com>2022-07-13 22:53:05 -0400
commit3d73b200f9893d8f5ba5d105e8b69c8d16744fa2 (patch)
treee49db15da4cecb56aef0987b769d1cfd945194c4
parent9821106213c826f9c3dbccb617ce76f8981c8aba (diff)
downloadlinux-3d73b200f9893d8f5ba5d105e8b69c8d16744fa2.tar.bz2
scsi: ufs: ufs-exynos: Change ufs phy control sequence
Since commit 1599069a62c6 ("phy: core: Warn when phy_power_on is called before phy_init"), the following warning has been reported: phy_power_on was called before phy_init To address this, we need to remove phy_power_on from exynos_ufs_phy_init() and move it after phy_init. phy_power_off and phy_exit are also necessary in exynos_ufs_remove(). Link: https://lore.kernel.org/r/20220706020255.151177-4-chanho61.park@samsung.com Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Chanho Park <chanho61.park@samsung.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/ufs/host/ufs-exynos.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c
index f971569bafc7..eced97538082 100644
--- a/drivers/ufs/host/ufs-exynos.c
+++ b/drivers/ufs/host/ufs-exynos.c
@@ -905,9 +905,13 @@ static int exynos_ufs_phy_init(struct exynos_ufs *ufs)
if (ret) {
dev_err(hba->dev, "%s: phy init failed, ret = %d\n",
__func__, ret);
- goto out_exit_phy;
+ return ret;
}
+ ret = phy_power_on(generic_phy);
+ if (ret)
+ goto out_exit_phy;
+
return 0;
out_exit_phy:
@@ -1169,10 +1173,6 @@ static int exynos_ufs_init(struct ufs_hba *hba)
goto out;
}
- ret = phy_power_on(ufs->phy);
- if (ret)
- goto phy_off;
-
exynos_ufs_priv_init(hba, ufs);
if (ufs->drv_data->drv_init) {
@@ -1190,8 +1190,6 @@ static int exynos_ufs_init(struct ufs_hba *hba)
exynos_ufs_config_smu(ufs);
return 0;
-phy_off:
- phy_power_off(ufs->phy);
out:
hba->priv = NULL;
return ret;
@@ -1602,9 +1600,14 @@ static int exynos_ufs_probe(struct platform_device *pdev)
static int exynos_ufs_remove(struct platform_device *pdev)
{
struct ufs_hba *hba = platform_get_drvdata(pdev);
+ struct exynos_ufs *ufs = ufshcd_get_variant(hba);
pm_runtime_get_sync(&(pdev)->dev);
ufshcd_remove(hba);
+
+ phy_power_off(ufs->phy);
+ phy_exit(ufs->phy);
+
return 0;
}