summaryrefslogtreecommitdiff
path: root/drivers/clk/mediatek/clk-cpumux.h
diff options
context:
space:
mode:
authorSean Wang <sean.wang@mediatek.com>2017-05-05 18:26:09 +0300
committerStephen Boyd <sboyd@codeaurora.org>2017-06-20 05:02:43 +0300
commit1e17de9049da5ef482ec8f6a875a83bec96bed3e (patch)
tree1811f4da3b94ee86457ef1dbd6932956690cb4f3 /drivers/clk/mediatek/clk-cpumux.h
parent34deaff763d41b5f73723a71c5f45383374dc7eb (diff)
downloadlinux-1e17de9049da5ef482ec8f6a875a83bec96bed3e.tar.xz
clk: mediatek: add missing cpu mux causing Mediatek cpufreq can't work
This patch adds CPU multiplexer clocks which are essential for Mediatek cpufreq driver. It would use the CPU clock multiplexer to switch to the intermediate clock source temporarily and then wait for the primary clock changing getting stable. Signed-off-by: Pi-Cheng Chen <pi-cheng.chen@linaro.org> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/mediatek/clk-cpumux.h')
-rw-r--r--drivers/clk/mediatek/clk-cpumux.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/clk/mediatek/clk-cpumux.h b/drivers/clk/mediatek/clk-cpumux.h
new file mode 100644
index 000000000000..dddaad57454d
--- /dev/null
+++ b/drivers/clk/mediatek/clk-cpumux.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2015 Linaro Ltd.
+ * Author: Pi-Cheng Chen <pi-cheng.chen@linaro.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __DRV_CLK_CPUMUX_H
+#define __DRV_CLK_CPUMUX_H
+
+struct mtk_clk_cpumux {
+ struct clk_hw hw;
+ struct regmap *regmap;
+ u32 reg;
+ u32 mask;
+ u8 shift;
+};
+
+int mtk_clk_register_cpumuxes(struct device_node *node,
+ const struct mtk_composite *clks, int num,
+ struct clk_onecell_data *clk_data);
+
+#endif /* __DRV_CLK_CPUMUX_H */