提交 a0cea833 编写于 作者: A Asutosh Das 提交者: Martin K. Petersen

scsi: ufs: ufs-qcom: Enter and exit hibern8 during clock scaling

Qualcomm controller needs to be in hibern8 before scaling clocks.  This
change puts the controller in hibern8 state before scaling and brings it
out after scaling of clocks.

Link: https://lore.kernel.org/r/212b7aaf6d834c4a8c682fdac4a59b84013ed573.1632818942.git.nguyenb@codeaurora.orgReviewed-by: NAlim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: NAsutosh Das <asutoshd@codeaurora.org>
Signed-off-by: NBao D. Nguyen <nguyenb@codeaurora.org>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 525943a5
...@@ -1212,24 +1212,34 @@ static int ufs_qcom_clk_scale_notify(struct ufs_hba *hba, ...@@ -1212,24 +1212,34 @@ static int ufs_qcom_clk_scale_notify(struct ufs_hba *hba,
int err = 0; int err = 0;
if (status == PRE_CHANGE) { if (status == PRE_CHANGE) {
err = ufshcd_uic_hibern8_enter(hba);
if (err)
return err;
if (scale_up) if (scale_up)
err = ufs_qcom_clk_scale_up_pre_change(hba); err = ufs_qcom_clk_scale_up_pre_change(hba);
else else
err = ufs_qcom_clk_scale_down_pre_change(hba); err = ufs_qcom_clk_scale_down_pre_change(hba);
if (err)
ufshcd_uic_hibern8_exit(hba);
} else { } else {
if (scale_up) if (scale_up)
err = ufs_qcom_clk_scale_up_post_change(hba); err = ufs_qcom_clk_scale_up_post_change(hba);
else else
err = ufs_qcom_clk_scale_down_post_change(hba); err = ufs_qcom_clk_scale_down_post_change(hba);
if (err || !dev_req_params)
if (err || !dev_req_params) {
ufshcd_uic_hibern8_exit(hba);
goto out; goto out;
}
ufs_qcom_cfg_timers(hba, ufs_qcom_cfg_timers(hba,
dev_req_params->gear_rx, dev_req_params->gear_rx,
dev_req_params->pwr_rx, dev_req_params->pwr_rx,
dev_req_params->hs_rate, dev_req_params->hs_rate,
false); false);
ufshcd_uic_hibern8_exit(hba);
} }
out: out:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册