summaryrefslogtreecommitdiff
path: root/drivers/ufs
diff options
context:
space:
mode:
authorPeter Griffin <peter.griffin@linaro.org>2026-01-09 11:40:14 +0000
committerMartin K. Petersen <martin.petersen@oracle.com>2026-01-16 23:04:00 -0500
commit07959ef517b853e834eadd0647d3860252af8f99 (patch)
treefb95cfde3b9ae323bc8bb0ac3675423b7de9ae95 /drivers/ufs
parentee8112a2e0f96d7a125c6ad3a7851e0d598c28a8 (diff)
scsi: ufs: exynos: Call phy_notify_state() from hibern8 callbacks
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> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Link: https://patch.msgid.link/20260109-ufs-exynos-phy_notify_pmstate-v3-1-7eb692e271af@linaro.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/ufs')
-rw-r--r--drivers/ufs/host/ufs-exynos.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c
index 70d195179eba..76fee3a79c77 100644
--- a/drivers/ufs/host/ufs-exynos.c
+++ b/drivers/ufs/host/ufs-exynos.c
@@ -1568,12 +1568,17 @@ static void exynos_ufs_pre_hibern8(struct ufs_hba *hba, enum uic_cmd_dme cmd)
{
struct exynos_ufs *ufs = ufshcd_get_variant(hba);
struct exynos_ufs_uic_attr *attr = ufs->drv_data->uic_attr;
+ static const union phy_notify phystate = {
+ .ufs_state = PHY_UFS_HIBERN8_EXIT
+ };
if (cmd == UIC_CMD_DME_HIBER_EXIT) {
if (ufs->opts & EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL)
exynos_ufs_disable_auto_ctrl_hcc(ufs);
exynos_ufs_ungate_clks(ufs);
+ phy_notify_state(ufs->phy, phystate);
+
if (ufs->opts & EXYNOS_UFS_OPT_USE_SW_HIBERN8_TIMER) {
static const unsigned int granularity_tbl[] = {
1, 4, 8, 16, 32, 100
@@ -1600,12 +1605,17 @@ static void exynos_ufs_pre_hibern8(struct ufs_hba *hba, enum uic_cmd_dme cmd)
static void exynos_ufs_post_hibern8(struct ufs_hba *hba, enum uic_cmd_dme cmd)
{
struct exynos_ufs *ufs = ufshcd_get_variant(hba);
+ static const union phy_notify phystate = {
+ .ufs_state = PHY_UFS_HIBERN8_ENTER
+ };
if (cmd == UIC_CMD_DME_HIBER_ENTER) {
ufs->entry_hibern8_t = ktime_get();
exynos_ufs_gate_clks(ufs);
if (ufs->opts & EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL)
exynos_ufs_enable_auto_ctrl_hcc(ufs);
+
+ phy_notify_state(ufs->phy, phystate);
}
}