summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorSubhash Jadavani <subhashj@codeaurora.org>2014-09-21 00:00:27 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 10:57:29 -0700
commit9d89b6c4c80db9b7d62f40e5cca9b8730c828ada (patch)
treec4e1c9cb801f3ec48d23dc1c451e5f81ba85e927 /include/linux
parent8c17ea4d5b35ea2004ccea98ee8c8cdf308ba535 (diff)
scsi: ufs-qcom: enable host controller hardware clock gating
The UTP controller has a number of internal clock gating cells (CGCs). Internal hardware sub-modules within the UTP controller control the CGCs. Hardware CGCs disable the clock to inactivate UTP sub-modules not involved in a specific operation, UTP controller CGCs are by default disabled and this change enables them (after every UFS link startup) to save some power leakage. Change-Id: I47bba62436c5913eb6755e59c36a11fea2e9468f Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/scsi/ufs/ufs-qcom.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/scsi/ufs/ufs-qcom.h b/include/linux/scsi/ufs/ufs-qcom.h
index 2bcb1edd53fa..e3c7342a4772 100644
--- a/include/linux/scsi/ufs/ufs-qcom.h
+++ b/include/linux/scsi/ufs/ufs-qcom.h
@@ -60,6 +60,21 @@ enum {
REG_UFS_HW_VERSION = 0xE4,
};
+/* bit definitions for REG_UFS_CFG2 register */
+#define UAWM_HW_CGC_EN (1 << 0)
+#define UARM_HW_CGC_EN (1 << 1)
+#define TXUC_HW_CGC_EN (1 << 2)
+#define RXUC_HW_CGC_EN (1 << 3)
+#define DFC_HW_CGC_EN (1 << 4)
+#define TRLUT_HW_CGC_EN (1 << 5)
+#define TMRLUT_HW_CGC_EN (1 << 6)
+#define OCSC_HW_CGC_EN (1 << 7)
+
+#define REG_UFS_CFG2_CGC_EN_ALL (UAWM_HW_CGC_EN | UARM_HW_CGC_EN |\
+ TXUC_HW_CGC_EN | RXUC_HW_CGC_EN |\
+ DFC_HW_CGC_EN | TRLUT_HW_CGC_EN |\
+ TMRLUT_HW_CGC_EN | OCSC_HW_CGC_EN)
+
/* bit offset */
enum {
OFFSET_UFS_PHY_SOFT_RESET = 1,