scsi: ufs: read ref clk and icc level during init only

In order to minimize resume latency, pre-fetch
icc levels and reference clock during initialization
and avoid reading them each link startup
during resume.

Change-Id: Iab705068e46114eb3caa00c6e1b88a7862385d08
Signed-off-by: Noag <noag@codeaurora.org>
[subhashj@codeaurora.org: resolved merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
This commit is contained in:
Noag 2014-01-15 10:52:53 +02:00 committed by David Keitel
parent 57e694f677
commit 90c7800a6d

View file

@ -4638,12 +4638,14 @@ static int ufshcd_probe_hba(struct ufs_hba *hba)
if (ret)
goto out;
ret = ufshcd_get_device_ref_clk(hba);
if (ret) {
dev_err(hba->dev,
"%s: Failed reading bRefClkFreq attribute\n",
__func__);
ret = 0;
if (!hba->is_init_prefetch) {
ret = ufshcd_get_device_ref_clk(hba);
if (ret) {
dev_err(hba->dev,
"%s: Failed reading bRefClkFreq attribute\n",
__func__);
ret = 0;
}
}
/* UFS device is also active now */