diff options
author | Subhash Jadavani <subhashj@codeaurora.org> | 2015-02-13 13:27:40 -0800 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 10:58:55 -0700 |
commit | 978703baabbf82b2aee12172426349a89091db5d (patch) | |
tree | 03c0d5c65389e8cd2925909268aaae7018194e16 /drivers | |
parent | 65b6feb7815eeceaeb99fdf62992e8559b8dce9f (diff) |
scsi: ufs-qcom: skip update secure configuration
On latest UFS PHY HW revisions, UFS host controller secure configuration
is retained even during UFS host controller power collapse so we can
skip restoring the secure configuration after coming out of power collapse.
Change-Id: I6cb882c99bd621622286c0f045cbefd9c1b1a0b7
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/ufs/ufs-qcom.c | 6 | ||||
-rw-r--r-- | drivers/scsi/ufs/ufs-qcom.h | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c index 970e0cfa4e21..c39d12deefa7 100644 --- a/drivers/scsi/ufs/ufs-qcom.c +++ b/drivers/scsi/ufs/ufs-qcom.c @@ -1026,7 +1026,8 @@ static void ufs_qcom_set_caps(struct ufs_hba *hba) if (host->hw_ver.major >= 0x2) { hba->caps |= UFSHCD_CAP_POWER_COLLAPSE_DURING_HIBERN8; - host->caps = UFS_QCOM_CAP_QUNIPRO; + host->caps = UFS_QCOM_CAP_QUNIPRO | + UFS_QCOM_CAP_RETAIN_SEC_CFG_AFTER_PWR_COLLAPSE; } } @@ -1525,6 +1526,9 @@ static int ufs_qcom_update_sec_cfg(struct ufs_hba *hba, bool restore_sec_cfg) if (!host || !hba->vreg_info.vdd_hba || !(host->sec_cfg_updated ^ restore_sec_cfg)) { return 0; + } else if (host->caps & + UFS_QCOM_CAP_RETAIN_SEC_CFG_AFTER_PWR_COLLAPSE) { + return 0; } else if (!restore_sec_cfg) { /* * Clear the flag so next time when this function is called diff --git a/drivers/scsi/ufs/ufs-qcom.h b/drivers/scsi/ufs/ufs-qcom.h index e734574c150a..17f018a81e40 100644 --- a/drivers/scsi/ufs/ufs-qcom.h +++ b/drivers/scsi/ufs/ufs-qcom.h @@ -242,6 +242,12 @@ struct ufs_qcom_host { * controller supports the QUniPro mode. */ #define UFS_QCOM_CAP_QUNIPRO UFS_BIT(0) + + /* + * Set this capability if host controller can retain the secure + * configuration even after UFS controller core power collapse. + */ + #define UFS_QCOM_CAP_RETAIN_SEC_CFG_AFTER_PWR_COLLAPSE UFS_BIT(1) u32 caps; struct phy *generic_phy; |