clk: qcom: Add support for RCGs with shared branches
authorGeorgi Djakov <georgi.djakov@linaro.org>
Thu, 17 Sep 2015 16:39:27 +0000 (19:39 +0300)
committerStephen Boyd <sboyd@codeaurora.org>
Thu, 17 Sep 2015 19:35:59 +0000 (12:35 -0700)
commitd042877aa7a36e7a5e0bb8c60dcd86e939f205c9
treeffebe6f237d2fd9fffda7fcae6bce50fd7a3cfaa
parent93e71695daa654918fbe5b768cd8c5bca677df0c
clk: qcom: Add support for RCGs with shared branches

Some root clock generators may have child branches that are controlled
by different CPUs. These RCGs require some special operations:
 - some enable bits have to be toggled when we set the rate;
 - if RCG is disabled we only cache the rate and set it later when enabled;
 - when the RCG is disabled, the mux is set to the safe source;

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
[sboyd@codeaurora.org: Simplify recalc_rate implementation]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/qcom/clk-rcg.h
drivers/clk/qcom/clk-rcg2.c