summaryrefslogtreecommitdiff
path: root/drivers/clk/qcom/clk-krait.h
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2018-08-14 15:12:26 +0300
committerStephen Boyd <sboyd@kernel.org>2018-10-17 23:14:49 +0300
commit4d7dc77babfef1d6cb8fd825e2f17dc3384c3272 (patch)
tree1833d9730d0523b31bb8bda6d5d0001fca0339f2 /drivers/clk/qcom/clk-krait.h
parent1f79131bfd512f322c16b58dca581ce39beafab9 (diff)
downloadlinux-4d7dc77babfef1d6cb8fd825e2f17dc3384c3272.tar.xz
clk: qcom: Add support for Krait clocks
The Krait clocks are made up of a series of muxes and a divider that choose between a fixed rate clock and dedicated HFPLLs for each CPU. Instead of using mmio accesses to remux parents, the Krait implementation exposes the remux control via cp15 registers. Support these clocks. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Sricharan R <sricharan@codeaurora.org> Tested-by: Craig Tatlor <ctatlor97@gmail.com> [sboyd@kernel.org: Move hidden config to top outside of the visible qcom config zone so that menuconfig looks nice] Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/qcom/clk-krait.h')
-rw-r--r--drivers/clk/qcom/clk-krait.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/drivers/clk/qcom/clk-krait.h b/drivers/clk/qcom/clk-krait.h
new file mode 100644
index 000000000000..441ba1e18b81
--- /dev/null
+++ b/drivers/clk/qcom/clk-krait.h
@@ -0,0 +1,37 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#ifndef __QCOM_CLK_KRAIT_H
+#define __QCOM_CLK_KRAIT_H
+
+#include <linux/clk-provider.h>
+
+struct krait_mux_clk {
+ unsigned int *parent_map;
+ u32 offset;
+ u32 mask;
+ u32 shift;
+ u32 en_mask;
+ bool lpl;
+
+ struct clk_hw hw;
+ struct notifier_block clk_nb;
+};
+
+#define to_krait_mux_clk(_hw) container_of(_hw, struct krait_mux_clk, hw)
+
+extern const struct clk_ops krait_mux_clk_ops;
+
+struct krait_div2_clk {
+ u32 offset;
+ u8 width;
+ u32 shift;
+ bool lpl;
+
+ struct clk_hw hw;
+};
+
+#define to_krait_div2_clk(_hw) container_of(_hw, struct krait_div2_clk, hw)
+
+extern const struct clk_ops krait_div2_clk_ops;
+
+#endif