summaryrefslogtreecommitdiff
path: root/drivers/scsi/ufs/ufs.h
diff options
context:
space:
mode:
authorSubhash Jadavani <subhashj@codeaurora.org>2018-10-16 14:29:41 +0530
committerMartin K. Petersen <martin.petersen@oracle.com>2018-11-09 07:52:59 -0500
commit9e1e8a75708031937a0f92567c19760c92658410 (patch)
tree31e130823c44c8091cb8258d3d88f64abb1154f9 /drivers/scsi/ufs/ufs.h
parent371a6c328ad423c51ffcf68ec211d3eeb80f1874 (diff)
scsi: ufs: set the device reference clock setting
UFS host supplies the reference clock to UFS device and UFS device specification allows host to provide one of the 4 frequencies (19.2 MHz, 26 MHz, 38.4 MHz, 52 MHz) for reference clock. Host should set the device reference clock frequency setting in the device based on what frequency it is supplying to UFS device. Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by: Can Guo <cang@codeaurora.org> Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org> Reviewed-by: Evan Green <evgreen@chromium.org> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs/ufs.h')
-rw-r--r--drivers/scsi/ufs/ufs.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h
index 58087d3916d0..8e4e52663a69 100644
--- a/drivers/scsi/ufs/ufs.h
+++ b/drivers/scsi/ufs/ufs.h
@@ -378,6 +378,20 @@ enum query_opcode {
UPIU_QUERY_OPCODE_TOGGLE_FLAG = 0x8,
};
+/* bRefClkFreq attribute values */
+enum ufs_ref_clk_freq {
+ REF_CLK_FREQ_19_2_MHZ = 0,
+ REF_CLK_FREQ_26_MHZ = 1,
+ REF_CLK_FREQ_38_4_MHZ = 2,
+ REF_CLK_FREQ_52_MHZ = 3,
+ REF_CLK_FREQ_INVAL = -1,
+};
+
+struct ufs_ref_clk {
+ unsigned long freq_hz;
+ enum ufs_ref_clk_freq val;
+};
+
/* Query response result code */
enum {
QUERY_RESULT_SUCCESS = 0x00,