diff options
author | Georgi Djakov <georgi.djakov@linaro.org> | 2015-09-17 19:39:27 +0300 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2015-09-17 12:35:59 -0700 |
commit | d042877aa7a36e7a5e0bb8c60dcd86e939f205c9 (patch) | |
tree | ffebe6f237d2fd9fffda7fcae6bce50fd7a3cfaa /drivers/clk/qcom/clk-rcg.h | |
parent | 93e71695daa654918fbe5b768cd8c5bca677df0c (diff) | |
download | op-kernel-dev-d042877aa7a36e7a5e0bb8c60dcd86e939f205c9.zip op-kernel-dev-d042877aa7a36e7a5e0bb8c60dcd86e939f205c9.tar.gz |
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>
Diffstat (limited to 'drivers/clk/qcom/clk-rcg.h')
-rw-r--r-- | drivers/clk/qcom/clk-rcg.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/clk/qcom/clk-rcg.h b/drivers/clk/qcom/clk-rcg.h index 31f92d7..5012e5b 100644 --- a/drivers/clk/qcom/clk-rcg.h +++ b/drivers/clk/qcom/clk-rcg.h @@ -153,8 +153,8 @@ extern const struct clk_ops clk_dyn_rcg_ops; * @hid_width: number of bits in half integer divider * @parent_map: map from software's parent index to hardware's src_sel field * @freq_tbl: frequency table + * @current_freq: last cached frequency when using branches with shared RCGs * @clkr: regmap clock handle - * @lock: register lock * */ struct clk_rcg2 { @@ -163,12 +163,14 @@ struct clk_rcg2 { u8 hid_width; const struct parent_map *parent_map; const struct freq_tbl *freq_tbl; + unsigned long current_freq; struct clk_regmap clkr; }; #define to_clk_rcg2(_hw) container_of(to_clk_regmap(_hw), struct clk_rcg2, clkr) extern const struct clk_ops clk_rcg2_ops; +extern const struct clk_ops clk_rcg2_shared_ops; extern const struct clk_ops clk_edp_pixel_ops; extern const struct clk_ops clk_byte_ops; extern const struct clk_ops clk_byte2_ops; |