aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ufs/ufs-qcom.h
diff options
context:
space:
mode:
authorYaniv Gardi <ygardi@codeaurora.org>2015-03-31 17:37:14 +0300
committerJames Bottomley <JBottomley@Odin.com>2015-04-10 08:53:56 -0700
commitcad2e03d8607793fd71a830b4b41fc8e9e9995ea (patch)
tree4ffd08cf1f701eb08fab9c4c01d9d8a84386dae4 /drivers/scsi/ufs/ufs-qcom.h
parentufs-qcom: save controller revision info in internal structure (diff)
downloadlinux-dev-cad2e03d8607793fd71a830b4b41fc8e9e9995ea.tar.xz
linux-dev-cad2e03d8607793fd71a830b4b41fc8e9e9995ea.zip
ufs: add support to allow non standard behaviours (quirks)
Some implementation of UFS host controller HW might have some non-standard behaviours (quirks) when compared to behaviour specified by UFSHCI specification. This patch add support to allow specifying all such quirks to standard UFS host controller driver so standard driver takes them into account. In this change a UFSHCD_QUIRK_DELAY_BEFORE_DME_CMDS is introduced, where a minimum delay of 1ms is required before DME commands for stability purposes. Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org> Reviewed-by: Gilad Broner <gbroner@codeaurora.org> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'drivers/scsi/ufs/ufs-qcom.h')
-rw-r--r--drivers/scsi/ufs/ufs-qcom.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/scsi/ufs/ufs-qcom.h b/drivers/scsi/ufs/ufs-qcom.h
index 903739668228..db2c0a00e846 100644
--- a/drivers/scsi/ufs/ufs-qcom.h
+++ b/drivers/scsi/ufs/ufs-qcom.h
@@ -158,6 +158,16 @@ struct ufs_hw_version {
u8 major;
};
struct ufs_qcom_host {
+
+ /*
+ * Set this capability if host controller supports the QUniPro mode
+ * and if driver wants the Host controller to operate in QUniPro mode.
+ * Note: By default this capability will be kept enabled if host
+ * controller supports the QUniPro mode.
+ */
+ #define UFS_QCOM_CAP_QUNIPRO UFS_BIT(0)
+ u32 caps;
+
struct phy *generic_phy;
struct ufs_hba *hba;
struct ufs_qcom_bus_vote bus_vote;
@@ -175,4 +185,12 @@ struct ufs_qcom_host {
#define ufs_qcom_is_link_active(hba) ufshcd_is_link_active(hba)
#define ufs_qcom_is_link_hibern8(hba) ufshcd_is_link_hibern8(hba)
+static inline bool ufs_qcom_cap_qunipro(struct ufs_qcom_host *host)
+{
+ if (host->caps & UFS_QCOM_CAP_QUNIPRO)
+ return true;
+ else
+ return false;
+}
+
#endif /* UFS_QCOM_H_ */