mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
FROMLIST: scsi: 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. Bug: 143136976 Link: https://lore.kernel.org/lkml/1571849351-819-2-git-send-email-asutoshd@codeaurora.org/ Change-Id: I0a0903ff1dcc6edef1ac5ab32c3e943828b42a7e Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
This commit is contained in:
@@ -1305,18 +1305,27 @@ static int ufs_qcom_clk_scale_notify(struct ufs_hba *hba,
|
||||
int err = 0;
|
||||
|
||||
if (status == PRE_CHANGE) {
|
||||
err = ufshcd_uic_hibern8_enter(hba);
|
||||
if (err)
|
||||
return err;
|
||||
if (scale_up)
|
||||
err = ufs_qcom_clk_scale_up_pre_change(hba);
|
||||
else
|
||||
err = ufs_qcom_clk_scale_down_pre_change(hba);
|
||||
if (err)
|
||||
ufshcd_uic_hibern8_exit(hba);
|
||||
|
||||
} else {
|
||||
if (scale_up)
|
||||
err = ufs_qcom_clk_scale_up_post_change(hba);
|
||||
else
|
||||
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;
|
||||
}
|
||||
|
||||
ufs_qcom_cfg_timers(hba,
|
||||
dev_req_params->gear_rx,
|
||||
@@ -1324,6 +1333,7 @@ static int ufs_qcom_clk_scale_notify(struct ufs_hba *hba,
|
||||
dev_req_params->hs_rate,
|
||||
false);
|
||||
ufs_qcom_update_bus_bw_vote(host);
|
||||
ufshcd_uic_hibern8_exit(hba);
|
||||
}
|
||||
|
||||
out:
|
||||
|
||||
Reference in New Issue
Block a user