clk: qcom: Add safe switch hook for krait mux clocks
authorSricharan R <sricharan@codeaurora.org>
Tue, 14 Aug 2018 12:12:31 +0000 (17:42 +0530)
committerStephen Boyd <sboyd@kernel.org>
Wed, 17 Oct 2018 20:15:05 +0000 (13:15 -0700)
commit77612720a2362230af726baa4149c40ec7a7fb05
tree5c59d147a2debda901d6db8a2cb2e8ce90a4de5f
parentbf4503ccf321811192cb07f9711556237c3cf668
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>
drivers/clk/qcom/clk-krait.c
drivers/clk/qcom/clk-krait.h
drivers/clk/qcom/krait-cc.c