summaryrefslogtreecommitdiff
path: root/drivers/clk
diff options
context:
space:
mode:
authorAbhinav Kumar <abhinavk@codeaurora.org>2017-02-24 11:56:21 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-04-05 16:48:34 -0700
commit3a757d0376ff8f63b894fe129c6dc02755a9add8 (patch)
tree5d3f848f3678b0645ffdc221d000d83127319df8 /drivers/clk
parentb2e934426e075085395a04261280ca0b05547e89 (diff)
clk: mdss: adjust PLL disable sequence to avoid glitch
Adjust the PLL disable sequence as per the latest HW programming guidelines to ensure there will not be any stray clock glitches when PLL is turned OFF abruptly. Change-Id: I6df35bbe18b0c42b43f38b9dd85c3502b2038928 Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/msm/mdss/mdss-dsi-pll-8998.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/clk/msm/mdss/mdss-dsi-pll-8998.c b/drivers/clk/msm/mdss/mdss-dsi-pll-8998.c
index 79e5aa16989b..eb69ed35f46d 100644
--- a/drivers/clk/msm/mdss/mdss-dsi-pll-8998.c
+++ b/drivers/clk/msm/mdss/mdss-dsi-pll-8998.c
@@ -634,7 +634,6 @@ error:
static void dsi_pll_disable_sub(struct mdss_pll_resources *rsc)
{
- dsi_pll_disable_global_clk(rsc);
MDSS_PLL_REG_W(rsc->phy_base, PHY_CMN_RBUF_CTRL, 0);
dsi_pll_disable_pll_bias(rsc);
}
@@ -653,11 +652,20 @@ static void dsi_pll_disable(struct dsi_pll_vco_clk *vco)
pr_debug("stop PLL (%d)\n", rsc->index);
+ /*
+ * To avoid any stray glitches while
+ * abruptly powering down the PLL
+ * make sure to gate the clock using
+ * the clock enable bit before powering
+ * down the PLL
+ **/
+ dsi_pll_disable_global_clk(rsc);
MDSS_PLL_REG_W(rsc->phy_base, PHY_CMN_PLL_CNTRL, 0);
dsi_pll_disable_sub(rsc);
- if (rsc->slave)
+ if (rsc->slave) {
+ dsi_pll_disable_global_clk(rsc->slave);
dsi_pll_disable_sub(rsc->slave);
-
+ }
/* flush, ensure all register writes are done*/
wmb();
rsc->pll_on = false;