scsi: ufs-qcom : Add quirk for broken auto hibern8
Some platforms might not support auto hibern8 even though the controller exposes this capability. Add a quirk to disable auto hibern8 for such platforms. Change-Id: I4a027f89deddff4735df45da9cffbfb1849af5f4 Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
This commit is contained in:
parent
c4fcd60d69
commit
813edfeb4d
2 changed files with 8 additions and 1 deletions
|
@ -1355,6 +1355,9 @@ static void ufs_qcom_advertise_quirks(struct ufs_hba *hba)
|
||||||
| UFSHCD_QUIRK_DME_PEER_ACCESS_AUTO_MODE
|
| UFSHCD_QUIRK_DME_PEER_ACCESS_AUTO_MODE
|
||||||
| UFSHCD_QUIRK_BROKEN_PA_RXHSUNTERMCAP);
|
| UFSHCD_QUIRK_BROKEN_PA_RXHSUNTERMCAP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (host->disable_lpm)
|
||||||
|
hba->quirks |= UFSHCD_QUIRK_BROKEN_AUTO_HIBERN8;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ufs_qcom_set_caps(struct ufs_hba *hba)
|
static void ufs_qcom_set_caps(struct ufs_hba *hba)
|
||||||
|
|
|
@ -776,6 +776,9 @@ struct ufs_hba {
|
||||||
*/
|
*/
|
||||||
#define UFSHCD_QUIRK_BROKEN_UFS_HCI_VERSION UFS_BIT(5)
|
#define UFSHCD_QUIRK_BROKEN_UFS_HCI_VERSION UFS_BIT(5)
|
||||||
|
|
||||||
|
/* Auto hibern8 support is broken */
|
||||||
|
#define UFSHCD_QUIRK_BROKEN_AUTO_HIBERN8 UFS_BIT(6)
|
||||||
|
|
||||||
unsigned int quirks; /* Deviations from standard UFSHCI spec. */
|
unsigned int quirks; /* Deviations from standard UFSHCI spec. */
|
||||||
|
|
||||||
/* Device deviations from standard UFS device spec. */
|
/* Device deviations from standard UFS device spec. */
|
||||||
|
@ -936,7 +939,8 @@ static inline bool ufshcd_is_intr_aggr_allowed(struct ufs_hba *hba)
|
||||||
|
|
||||||
static inline bool ufshcd_is_auto_hibern8_supported(struct ufs_hba *hba)
|
static inline bool ufshcd_is_auto_hibern8_supported(struct ufs_hba *hba)
|
||||||
{
|
{
|
||||||
return !!(hba->capabilities & MASK_AUTO_HIBERN8_SUPPORT);
|
return !!((hba->capabilities & MASK_AUTO_HIBERN8_SUPPORT) &&
|
||||||
|
!(hba->quirks & UFSHCD_QUIRK_BROKEN_AUTO_HIBERN8));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool ufshcd_is_crypto_supported(struct ufs_hba *hba)
|
static inline bool ufshcd_is_crypto_supported(struct ufs_hba *hba)
|
||||||
|
|
Loading…
Add table
Reference in a new issue