Message ID | 20220705065440.117864-4-chanho61.park@samsung.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [1/3] phy: samsung-ufs: convert phy clk usage to clk_bulk API | expand |
On 05/07/2022 08:54, Chanho Park wrote: > Since commit 1599069a62c6 ("phy: core: Warn when phy_power_on is called > before phy_init"), below 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. > > Signed-off-by: Chanho Park <chanho61.park@samsung.com> > --- > drivers/ufs/host/ufs-exynos.c | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) > > diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c > index f971569bafc7..5718296e2521 100644 > --- a/drivers/ufs/host/ufs-exynos.c > +++ b/drivers/ufs/host/ufs-exynos.c > @@ -908,6 +908,8 @@ static int exynos_ufs_phy_init(struct exynos_ufs *ufs) > goto out_exit_phy; > } > > + phy_power_on(generic_phy); What about phy_power_on() return code? > + > return 0; > > out_exit_phy: > @@ -1169,10 +1171,6 @@ static int exynos_ufs_init(struct ufs_hba *hba) > goto out; > } > > - ret = phy_power_on(ufs->phy); > - if (ret) > - goto phy_off; > - Best regards, Krzysztof
> > Since commit 1599069a62c6 ("phy: core: Warn when phy_power_on is > > called before phy_init"), below 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. > > > > Signed-off-by: Chanho Park <chanho61.park@samsung.com> > > --- > > drivers/ufs/host/ufs-exynos.c | 13 +++++++------ > > 1 file changed, 7 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/ufs/host/ufs-exynos.c > > b/drivers/ufs/host/ufs-exynos.c index f971569bafc7..5718296e2521 > > 100644 > > --- a/drivers/ufs/host/ufs-exynos.c > > +++ b/drivers/ufs/host/ufs-exynos.c > > @@ -908,6 +908,8 @@ static int exynos_ufs_phy_init(struct exynos_ufs > *ufs) > > goto out_exit_phy; > > } > > > > + phy_power_on(generic_phy); > > > What about phy_power_on() return code? I'll back the check next patch. Best Regards, Chanho Park
diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c index f971569bafc7..5718296e2521 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -908,6 +908,8 @@ static int exynos_ufs_phy_init(struct exynos_ufs *ufs) goto out_exit_phy; } + phy_power_on(generic_phy); + return 0; out_exit_phy: @@ -1169,10 +1171,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 +1188,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 +1598,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; }
Since commit 1599069a62c6 ("phy: core: Warn when phy_power_on is called before phy_init"), below 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. Signed-off-by: Chanho Park <chanho61.park@samsung.com> --- drivers/ufs/host/ufs-exynos.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)