summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorSubhash Jadavani <subhashj@codeaurora.org>2014-09-25 17:55:26 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 10:57:32 -0700
commit8c30670fd832bf74ac4cdf45f5ae366e31cd52c4 (patch)
treec2a76903991f367367288d66e1f1c946d6822b97 /include/linux
parent0a81142619ded5b3f24cca651fa59ea17f7a7119 (diff)
scsi: ufs: tune UniPro parameters to optimize hibern8 exit time
Optimal values of local UniPro parameters like PA_Hibern8Time & PA_TActivate can help reduce the hibern8 exit latency. If both host and device supports UniPro ver1.6 or later, these parameters will be automatically tuned during link startup itself. But if either host or device doesn't support UniPro ver 1.6 or later, we have to manually tune them. But to keep manual tuning logic simple, we will only do manual tuning if local unipro version doesn't support ver1.6 or later. Change-Id: I533afe9b62a35602e4e766d76912db7ac9a480b6 Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org> [venkatg@codeaurora.org: resolved trivial merge conflicts] Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/scsi/ufs/unipro.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/scsi/ufs/unipro.h b/include/linux/scsi/ufs/unipro.h
index 6f9cd646930a..a0713c6642ca 100644
--- a/include/linux/scsi/ufs/unipro.h
+++ b/include/linux/scsi/ufs/unipro.h
@@ -13,6 +13,7 @@
/*
* M-TX Configuration Attributes
*/
+#define TX_HIBERN8TIME_CAPABILITY 0x000F
#define TX_MODE 0x0021
#define TX_HSRATE_SERIES 0x0022
#define TX_HSGEAR 0x0023
@@ -46,8 +47,13 @@
#define RX_ENTER_HIBERN8 0x00A7
#define RX_BYPASS_8B10B_ENABLE 0x00A8
#define RX_TERMINATION_FORCE_ENABLE 0x0089
+#define RX_MIN_ACTIVATETIME_CAPABILITY 0x008F
+#define RX_HIBERN8TIME_CAPABILITY 0x0092
#define is_mphy_tx_attr(attr) (attr < RX_MODE)
+#define RX_MIN_ACTIVATETIME_UNIT_US 100
+#define HIBERN8TIME_UNIT_US 100
+
/*
* PHY Adpater attributes
*/
@@ -108,6 +114,9 @@
#define PA_STALLNOCONFIGTIME 0x15A3
#define PA_SAVECONFIGTIME 0x15A4
+#define PA_TACTIVATE_TIME_UNIT_US 10
+#define PA_HIBERN8_TIME_UNIT_US 100
+
/* PA power modes */
enum {
FAST_MODE = 1,
@@ -141,6 +150,16 @@ enum ufs_hs_gear_tag {
UFS_HS_G3, /* HS Gear 3 */
};
+enum ufs_unipro_ver {
+ UFS_UNIPRO_VER_RESERVED = 0,
+ UFS_UNIPRO_VER_1_40 = 1, /* UniPro version 1.40 */
+ UFS_UNIPRO_VER_1_41 = 2, /* UniPro version 1.41 */
+ UFS_UNIPRO_VER_1_6 = 3, /* UniPro version 1.6 */
+ UFS_UNIPRO_VER_MAX = 4, /* UniPro unsupported version */
+ /* UniPro version field mask in PA_LOCALVERINFO */
+ UFS_UNIPRO_VER_MASK = 0xF,
+};
+
/*
* Data Link Layer Attributes
*/