From bfdbe8ba21291c024afcec95b7bd515b5bf69689 Mon Sep 17 00:00:00 2001 From: Yaniv Gardi Date: Tue, 31 Mar 2015 17:37:13 +0300 Subject: ufs-qcom: save controller revision info in internal structure Sometimes, specific information about the UFS controller revision is required in order to determine certain operations or execute controller dependent quirks. In order to avoid reading the controller revision multiple times, we simply read it once and save this information in internal structure. Signed-off-by: Yaniv Gardi Reviewed-by: Gilad Broner Signed-off-by: James Bottomley --- drivers/scsi/ufs/ufs-qcom.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/scsi/ufs/ufs-qcom.h') diff --git a/drivers/scsi/ufs/ufs-qcom.h b/drivers/scsi/ufs/ufs-qcom.h index 9a6febd007df..903739668228 100644 --- a/drivers/scsi/ufs/ufs-qcom.h +++ b/drivers/scsi/ufs/ufs-qcom.h @@ -151,6 +151,12 @@ struct ufs_qcom_bus_vote { struct device_attribute max_bus_bw; }; +/* Host controller hardware version: major.minor.step */ +struct ufs_hw_version { + u16 step; + u16 minor; + u8 major; +}; struct ufs_qcom_host { struct phy *generic_phy; struct ufs_hba *hba; @@ -161,6 +167,8 @@ struct ufs_qcom_host { struct clk *rx_l1_sync_clk; struct clk *tx_l1_sync_clk; bool is_lane_clks_enabled; + + struct ufs_hw_version hw_ver; }; #define ufs_qcom_is_link_off(hba) ufshcd_is_link_off(hba) -- cgit v1.2.3-59-g8ed1b