Revert "scsi: ufs: gate ref_clk during aggressive clk gating"

This reverts commit ca91fa16a7 ("scsi: ufs: gate ref_clk during
aggressive clk gating").

Reverting this change as its causing stability issues.

Change-Id: Ia04d33d84b5622179f7a496daee5584d4e2dde91
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
This commit is contained in:
Venkat Gopalakrishnan 2016-10-05 14:23:55 -07:00
parent 057bdafd97
commit 48ecffa1a0
2 changed files with 12 additions and 14 deletions

View file

@ -1498,14 +1498,10 @@ static int ufs_qcom_setup_clocks(struct ufs_hba *hba, bool on,
/* M-PHY RMMI interface clocks can be turned off */ /* M-PHY RMMI interface clocks can be turned off */
ufs_qcom_phy_disable_iface_clk(host->generic_phy); ufs_qcom_phy_disable_iface_clk(host->generic_phy);
/* if (!ufs_qcom_is_link_active(hba)) {
* If auto hibern8 is supported then the link will already if (!is_gating_context)
* be in hibern8 state and the ref clock can be gated. /* turn off UFS local PHY ref_clk */
*/ ufs_qcom_phy_disable_ref_clk(host->generic_phy);
if (ufshcd_is_auto_hibern8_supported(hba) ||
!ufs_qcom_is_link_active(hba)) {
/* turn off UFS local PHY ref_clk */
ufs_qcom_phy_disable_ref_clk(host->generic_phy);
/* disable device ref_clk */ /* disable device ref_clk */
ufs_qcom_dev_ref_clk_ctrl(host, false); ufs_qcom_dev_ref_clk_ctrl(host, false);
} }
@ -1960,6 +1956,13 @@ static int ufs_qcom_init(struct ufs_hba *hba)
host->hba = hba; host->hba = hba;
ufshcd_set_variant(hba, host); ufshcd_set_variant(hba, host);
/*
* voting/devoting device ref_clk source is time consuming hence
* skip devoting it during aggressive clock gating. This clock
* will still be gated off during runtime suspend.
*/
hba->no_ref_clk_gating = true;
err = ufs_qcom_ice_get_dev(host); err = ufs_qcom_ice_get_dev(host);
if (err == -EPROBE_DEFER) { if (err == -EPROBE_DEFER) {
/* /*

View file

@ -1346,12 +1346,7 @@ static void ufshcd_gate_work(struct work_struct *work)
ufshcd_set_link_hibern8(hba); ufshcd_set_link_hibern8(hba);
} }
/* if (!ufshcd_is_link_active(hba) && !hba->no_ref_clk_gating)
* If auto hibern8 is supported then the link will already
* be in hibern8 state and the ref clock can be gated.
*/
if ((ufshcd_is_auto_hibern8_supported(hba) ||
!ufshcd_is_link_active(hba)) && !hba->no_ref_clk_gating)
ufshcd_disable_clocks(hba, true); ufshcd_disable_clocks(hba, true);
else else
/* If link is active, device ref_clk can't be switched off */ /* If link is active, device ref_clk can't be switched off */