aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@linaro.org>2019-03-06 12:47:57 -0500
committerStephen Boyd <sboyd@kernel.org>2019-04-11 16:34:21 -0400
commit360fed42282e47dfc3c641c90070c556756d3565 (patch)
tree45cd6f92913fa908cf51efa81cd08cb2f5c74936
parent5f19c6e936f2300fa236773a4aef3b4ec8aaad7c (diff)
clk: qcom: branch: Add AON clock ops
Some clocks can only be turned on by resetting the block containing them, provide a clock type that allow us to reference these clocks and have the client drivers enable and "disable" them. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
-rw-r--r--drivers/clk/qcom/clk-branch.c6
-rw-r--r--drivers/clk/qcom/clk-branch.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/clk/qcom/clk-branch.c b/drivers/clk/qcom/clk-branch.c
index 99446bf630aa..f869fc6aaed6 100644
--- a/drivers/clk/qcom/clk-branch.c
+++ b/drivers/clk/qcom/clk-branch.c
@@ -146,6 +146,12 @@ const struct clk_ops clk_branch2_ops = {
146}; 146};
147EXPORT_SYMBOL_GPL(clk_branch2_ops); 147EXPORT_SYMBOL_GPL(clk_branch2_ops);
148 148
149const struct clk_ops clk_branch2_aon_ops = {
150 .enable = clk_branch2_enable,
151 .is_enabled = clk_is_enabled_regmap,
152};
153EXPORT_SYMBOL_GPL(clk_branch2_aon_ops);
154
149const struct clk_ops clk_branch_simple_ops = { 155const struct clk_ops clk_branch_simple_ops = {
150 .enable = clk_enable_regmap, 156 .enable = clk_enable_regmap,
151 .disable = clk_disable_regmap, 157 .disable = clk_disable_regmap,
diff --git a/drivers/clk/qcom/clk-branch.h b/drivers/clk/qcom/clk-branch.h
index b3561e0a3984..17a58119165e 100644
--- a/drivers/clk/qcom/clk-branch.h
+++ b/drivers/clk/qcom/clk-branch.h
@@ -40,6 +40,7 @@ struct clk_branch {
40extern const struct clk_ops clk_branch_ops; 40extern const struct clk_ops clk_branch_ops;
41extern const struct clk_ops clk_branch2_ops; 41extern const struct clk_ops clk_branch2_ops;
42extern const struct clk_ops clk_branch_simple_ops; 42extern const struct clk_ops clk_branch_simple_ops;
43extern const struct clk_ops clk_branch2_aon_ops;
43 44
44#define to_clk_branch(_hw) \ 45#define to_clk_branch(_hw) \
45 container_of(to_clk_regmap(_hw), struct clk_branch, clkr) 46 container_of(to_clk_regmap(_hw), struct clk_branch, clkr)