mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
FROMGIT: 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
Bug: 188004633
Change-Id: I902935f5bb987d1cf3b80170cc9eb866de44bc13
(cherry picked from commit c625b80b9d
https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git scsi-fixes)
Link: https://lore.kernel.org/r/1620813706-25331-1-git-send-email-peter.wang@mediatek.com
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Peter Wang <peter.wang@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
This commit is contained in:
parent
b5b3246504
commit
560fdb20e4
|
|
@ -916,6 +916,7 @@ static void ufs_mtk_vreg_set_lpm(struct ufs_hba *hba, bool lpm)
|
||||||
static int ufs_mtk_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
|
static int ufs_mtk_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
struct arm_smccc_res res;
|
||||||
|
|
||||||
if (ufshcd_is_link_hibern8(hba)) {
|
if (ufshcd_is_link_hibern8(hba)) {
|
||||||
err = ufs_mtk_link_set_lpm(hba);
|
err = ufs_mtk_link_set_lpm(hba);
|
||||||
|
|
@ -935,6 +936,9 @@ static int ufs_mtk_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ufshcd_is_link_off(hba))
|
||||||
|
ufs_mtk_device_reset_ctrl(0, res);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
fail:
|
fail:
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user