linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: ufs: exynos: call phy_notify_pmstate() from hibern8 callbacks
@ 2025-07-03 14:07 Peter Griffin
  2025-07-07 20:18 ` Bart Van Assche
  2025-07-14 17:09 ` Martin K. Petersen
  0 siblings, 2 replies; 5+ messages in thread
From: Peter Griffin @ 2025-07-03 14:07 UTC (permalink / raw)
  To: Alim Akhtar, James E.J. Bottomley, Martin K. Petersen,
	Krzysztof Kozlowski
  Cc: linux-scsi, linux-samsung-soc, linux-arm-kernel, linux-kernel,
	Peter Griffin

Notify the ufs phy of the hibern8 link state so that it can program the
appropriate values.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
---
Note this patch has a dependency on the new API proposed in [1]

[1] https://lore.kernel.org/lkml/20250703-phy-notify-pmstate-v2-0-fc1690439117@linaro.org/ 
---
 drivers/ufs/host/ufs-exynos.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c
index 3e545af536e53e06b66c624ed0dc6dc7de13549f..e9fac23dc15abd685aba4c169c82e211040dec8b 100644
--- a/drivers/ufs/host/ufs-exynos.c
+++ b/drivers/ufs/host/ufs-exynos.c
@@ -1574,6 +1574,8 @@ static void exynos_ufs_pre_hibern8(struct ufs_hba *hba, enum uic_cmd_dme cmd)
 			exynos_ufs_disable_auto_ctrl_hcc(ufs);
 		exynos_ufs_ungate_clks(ufs);
 
+		phy_notify_pmstate(ufs->phy, PHY_UFS_HIBERN8_EXIT);
+
 		if (ufs->opts & EXYNOS_UFS_OPT_USE_SW_HIBERN8_TIMER) {
 			static const unsigned int granularity_tbl[] = {
 				1, 4, 8, 16, 32, 100
@@ -1606,6 +1608,8 @@ static void exynos_ufs_post_hibern8(struct ufs_hba *hba, enum uic_cmd_dme cmd)
 		exynos_ufs_gate_clks(ufs);
 		if (ufs->opts & EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL)
 			exynos_ufs_enable_auto_ctrl_hcc(ufs);
+
+		phy_notify_pmstate(ufs->phy, PHY_UFS_HIBERN8_ENTER);
 	}
 }
 

---
base-commit: 4611e0cba12ff5bb64b469cfac129f40f41b5caf
change-id: 20250703-ufs-exynos-phy_notify_pmstate-c0e9db95ac66
prerequisite-change-id: 20250703-phy-notify-pmstate-f02ba5582f65:v2
prerequisite-patch-id: 99070bdd3132b74f7b8932d3d8bef685815a5edd
prerequisite-patch-id: 02cd952ede323864a87816a20e3f6e06b885eab3

Best regards,
-- 
Peter Griffin <peter.griffin@linaro.org>


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] scsi: ufs: exynos: call phy_notify_pmstate() from hibern8 callbacks
  2025-07-03 14:07 [PATCH] scsi: ufs: exynos: call phy_notify_pmstate() from hibern8 callbacks Peter Griffin
@ 2025-07-07 20:18 ` Bart Van Assche
  2025-07-14 17:09 ` Martin K. Petersen
  1 sibling, 0 replies; 5+ messages in thread
From: Bart Van Assche @ 2025-07-07 20:18 UTC (permalink / raw)
  To: Peter Griffin, Alim Akhtar, James E.J. Bottomley,
	Martin K. Petersen, Krzysztof Kozlowski
  Cc: linux-scsi, linux-samsung-soc, linux-arm-kernel, linux-kernel

On 7/3/25 7:07 AM, Peter Griffin wrote:
> Notify the ufs phy of the hibern8 link state so that it can program the
> appropriate values.
Reviewed-by: Bart Van Assche <bvanassche@acm.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scsi: ufs: exynos: call phy_notify_pmstate() from hibern8 callbacks
  2025-07-03 14:07 [PATCH] scsi: ufs: exynos: call phy_notify_pmstate() from hibern8 callbacks Peter Griffin
  2025-07-07 20:18 ` Bart Van Assche
@ 2025-07-14 17:09 ` Martin K. Petersen
  2025-07-14 22:14   ` Martin K. Petersen
  1 sibling, 1 reply; 5+ messages in thread
From: Martin K. Petersen @ 2025-07-14 17:09 UTC (permalink / raw)
  To: Peter Griffin
  Cc: Alim Akhtar, James E.J. Bottomley, Martin K. Petersen,
	Krzysztof Kozlowski, linux-scsi, linux-samsung-soc,
	linux-arm-kernel, linux-kernel


Peter,

> Notify the ufs phy of the hibern8 link state so that it can program the
> appropriate values.

Applied to 6.17/scsi-staging, thanks!

-- 
Martin K. Petersen

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scsi: ufs: exynos: call phy_notify_pmstate() from hibern8 callbacks
  2025-07-14 17:09 ` Martin K. Petersen
@ 2025-07-14 22:14   ` Martin K. Petersen
  2025-07-16 10:16     ` Peter Griffin
  0 siblings, 1 reply; 5+ messages in thread
From: Martin K. Petersen @ 2025-07-14 22:14 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: Peter Griffin, Alim Akhtar, James E.J. Bottomley,
	Krzysztof Kozlowski, linux-scsi, linux-samsung-soc,
	linux-arm-kernel, linux-kernel


>> Notify the ufs phy of the hibern8 link state so that it can program the
>> appropriate values.
>
> Applied to 6.17/scsi-staging, thanks!

This appears to have a dependency on a patch series aimed at the phy
tree.

-- 
Martin K. Petersen

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scsi: ufs: exynos: call phy_notify_pmstate() from hibern8 callbacks
  2025-07-14 22:14   ` Martin K. Petersen
@ 2025-07-16 10:16     ` Peter Griffin
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Griffin @ 2025-07-16 10:16 UTC (permalink / raw)
  To: Martin K. Petersen, Vinod Koul
  Cc: Alim Akhtar, James E.J. Bottomley, Krzysztof Kozlowski,
	linux-scsi, linux-samsung-soc, linux-arm-kernel, linux-kernel

Hi Martin,

+ Vinod (phy maintainer)

On Mon, 14 Jul 2025 at 23:15, Martin K. Petersen
<martin.petersen@oracle.com> wrote:
>
>
> >> Notify the ufs phy of the hibern8 link state so that it can program the
> >> appropriate values.
> >
> > Applied to 6.17/scsi-staging, thanks!
>
> This appears to have a dependency on a patch series aimed at the phy
> tree.

Thanks for your email. Yes you're correct, as mentioned after the ---
in the patch this has a dependency on the new API proposed in [1] so
can't be queued currently.

Thanks,

Peter

[1] https://lore.kernel.org/lkml/20250703-phy-notify-pmstate-v2-0-fc1690439117@linaro.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-07-16 10:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-03 14:07 [PATCH] scsi: ufs: exynos: call phy_notify_pmstate() from hibern8 callbacks Peter Griffin
2025-07-07 20:18 ` Bart Van Assche
2025-07-14 17:09 ` Martin K. Petersen
2025-07-14 22:14   ` Martin K. Petersen
2025-07-16 10:16     ` Peter Griffin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).