Skip to content

Commit c625b80

Browse files
ptr324martinkpetersen
authored andcommitted
scsi: ufs: ufs-mediatek: Fix power down spec violation
As per spec, e.g. JESD220E chapter 7.2, while powering off the UFS device, RST_N signal should be between VSS(Ground) and VCCQ/VCCQ2. The power down sequence after fixing: Power down: 1. Assert RST_N low 2. Turn-off VCC 3. Turn-off VCCQ/VCCQ2 Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Stanley Chu <[email protected]> Signed-off-by: Peter Wang <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 6efb943 commit c625b80

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/scsi/ufs/ufs-mediatek.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -922,6 +922,7 @@ static void ufs_mtk_vreg_set_lpm(struct ufs_hba *hba, bool lpm)
922922
static int ufs_mtk_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
923923
{
924924
int err;
925+
struct arm_smccc_res res;
925926

926927
if (ufshcd_is_link_hibern8(hba)) {
927928
err = ufs_mtk_link_set_lpm(hba);
@@ -941,6 +942,9 @@ static int ufs_mtk_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
941942
goto fail;
942943
}
943944

945+
if (ufshcd_is_link_off(hba))
946+
ufs_mtk_device_reset_ctrl(0, res);
947+
944948
return 0;
945949
fail:
946950
/*

0 commit comments

Comments
 (0)