Skip to content

Commit 07959ef

Browse files
petegriffinmartinkpetersen
authored andcommitted
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>
1 parent ee8112a commit 07959ef

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

drivers/ufs/host/ufs-exynos.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1568,12 +1568,17 @@ static void exynos_ufs_pre_hibern8(struct ufs_hba *hba, enum uic_cmd_dme cmd)
15681568
{
15691569
struct exynos_ufs *ufs = ufshcd_get_variant(hba);
15701570
struct exynos_ufs_uic_attr *attr = ufs->drv_data->uic_attr;
1571+
static const union phy_notify phystate = {
1572+
.ufs_state = PHY_UFS_HIBERN8_EXIT
1573+
};
15711574

15721575
if (cmd == UIC_CMD_DME_HIBER_EXIT) {
15731576
if (ufs->opts & EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL)
15741577
exynos_ufs_disable_auto_ctrl_hcc(ufs);
15751578
exynos_ufs_ungate_clks(ufs);
15761579

1580+
phy_notify_state(ufs->phy, phystate);
1581+
15771582
if (ufs->opts & EXYNOS_UFS_OPT_USE_SW_HIBERN8_TIMER) {
15781583
static const unsigned int granularity_tbl[] = {
15791584
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)
16001605
static void exynos_ufs_post_hibern8(struct ufs_hba *hba, enum uic_cmd_dme cmd)
16011606
{
16021607
struct exynos_ufs *ufs = ufshcd_get_variant(hba);
1608+
static const union phy_notify phystate = {
1609+
.ufs_state = PHY_UFS_HIBERN8_ENTER
1610+
};
16031611

16041612
if (cmd == UIC_CMD_DME_HIBER_ENTER) {
16051613
ufs->entry_hibern8_t = ktime_get();
16061614
exynos_ufs_gate_clks(ufs);
16071615
if (ufs->opts & EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL)
16081616
exynos_ufs_enable_auto_ctrl_hcc(ufs);
1617+
1618+
phy_notify_state(ufs->phy, phystate);
16091619
}
16101620
}
16111621

0 commit comments

Comments
 (0)