summaryrefslogtreecommitdiff
path: root/drivers/clk/qcom/clk-krait.c
diff options
context:
space:
mode:
authorSricharan R <sricharan@codeaurora.org>2018-08-14 15:12:31 +0300
committerStephen Boyd <sboyd@kernel.org>2018-10-17 23:15:05 +0300
commit77612720a2362230af726baa4149c40ec7a7fb05 (patch)
tree5c59d147a2debda901d6db8a2cb2e8ce90a4de5f /drivers/clk/qcom/clk-krait.c
parentbf4503ccf321811192cb07f9711556237c3cf668 (diff)
downloadlinux-77612720a2362230af726baa4149c40ec7a7fb05.tar.xz
clk: qcom: Add safe switch hook for krait mux clocks
When the Hfplls are reprogrammed during the rate change, the primary muxes which are sourced from the same hfpll for higher frequencies, needs to be switched to the 'safe secondary mux' as the parent for that small window. This is done by registering a clk notifier for the muxes and switching to the safe parent in the PRE_RATE_CHANGE notifier and back to the original parent in the POST_RATE_CHANGE notifier. Signed-off-by: Sricharan R <sricharan@codeaurora.org> Tested-by: Craig Tatlor <ctatlor97@gmail.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/qcom/clk-krait.c')
-rw-r--r--drivers/clk/qcom/clk-krait.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/clk/qcom/clk-krait.c b/drivers/clk/qcom/clk-krait.c
index 7ede744c6a14..59f1af415b58 100644
--- a/drivers/clk/qcom/clk-krait.c
+++ b/drivers/clk/qcom/clk-krait.c
@@ -50,6 +50,8 @@ static int krait_mux_set_parent(struct clk_hw *hw, u8 index)
if (__clk_is_enabled(hw->clk))
__krait_mux_set_sel(mux, sel);
+ mux->reparent = true;
+
return 0;
}