diff options
author | Yaniv Gardi <ygardi@codeaurora.org> | 2015-05-17 17:55:05 +0200 |
---|---|---|
committer | James Bottomley <JBottomley@Odin.com> | 2015-06-02 22:20:14 +0200 |
commit | 9949e702e69718965f3c3c6787eb17d420daa7df (patch) | |
tree | 969e36fdaed3154ace03c9284c7bc5d7c54c270e /drivers/scsi/ufs/ufshcd.c | |
parent | scsi: ufs-qcom: enable UFSHCD_QUIRK_DME_PEER_ACCESS_AUTO_MODE quirk (diff) | |
download | linux-9949e702e69718965f3c3c6787eb17d420daa7df.tar.xz linux-9949e702e69718965f3c3c6787eb17d420daa7df.zip |
scsi: ufs: add quirk to handle broken UFS HCI version
Some host controller hardware controllers may not advertise correct
version in UFS HCI VER register. To workaround this, add new quirk
and call the host controller hardware vendor specific callback to
get the correct UFS HCI version register value.
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'drivers/scsi/ufs/ufshcd.c')
-rw-r--r-- | drivers/scsi/ufs/ufshcd.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 014f1c0f843a..b0ade73f8c6a 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -271,6 +271,11 @@ static inline u32 ufshcd_get_intr_mask(struct ufs_hba *hba) */ static inline u32 ufshcd_get_ufs_version(struct ufs_hba *hba) { + if (hba->quirks & UFSHCD_QUIRK_BROKEN_UFS_HCI_VERSION) { + if (hba->vops && hba->vops->get_ufs_hci_version) + return hba->vops->get_ufs_hci_version(hba); + } + return ufshcd_readl(hba, REG_UFS_VERSION); } |