summaryrefslogtreecommitdiffstats
path: root/drivers/clk/zte/clk.h
diff options
context:
space:
mode:
authorJun Nie <jun.nie@linaro.org>2016-12-16 15:26:47 +0800
committerStephen Boyd <sboyd@codeaurora.org>2017-01-09 16:06:43 -0800
commitedc6da239a1ac7ed1c657b1421c7c714a99db4d9 (patch)
tree1993e20ad437eae400985f3a165db6cc58df0cce /drivers/clk/zte/clk.h
parent699902760538eb37cc53725323b57924d1f0f1ff (diff)
downloadlinux-edc6da239a1ac7ed1c657b1421c7c714a99db4d9.tar.bz2
clk: zte: add audio clocks for zx296718
The audio related clock support is missing from the existing zx296718 clock driver. Let's add it, so that the upstream ZX SPDIF driver can work for HDMI audio support. Signed-off-by: Jun Nie <jun.nie@linaro.org> Signed-off-by: Shawn Guo <shawn.guo@linaro.org> [sboyd@codeaurora.org: Staticize some more structures] Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/zte/clk.h')
-rw-r--r--drivers/clk/zte/clk.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/clk/zte/clk.h b/drivers/clk/zte/clk.h
index 0df3474b2cf3..84a55a3e2bd4 100644
--- a/drivers/clk/zte/clk.h
+++ b/drivers/clk/zte/clk.h
@@ -153,6 +153,25 @@ struct zx_clk_div {
.id = _id, \
}
+struct clk_zx_audio_divider {
+ struct clk_hw hw;
+ void __iomem *reg_base;
+ unsigned int rate_count;
+ spinlock_t *lock;
+ u16 id;
+};
+
+#define AUDIO_DIV(_id, _name, _parent, _reg) \
+{ \
+ .reg_base = (void __iomem *) _reg, \
+ .lock = &clk_lock, \
+ .hw.init = CLK_HW_INIT(_name, \
+ _parent, \
+ &zx_audio_div_ops, \
+ 0), \
+ .id = _id, \
+}
+
struct clk *clk_register_zx_pll(const char *name, const char *parent_name,
unsigned long flags, void __iomem *reg_base,
const struct zx_pll_config *lookup_table, int count, spinlock_t *lock);
@@ -167,4 +186,6 @@ struct clk *clk_register_zx_audio(const char *name,
unsigned long flags, void __iomem *reg_base);
extern const struct clk_ops zx_pll_ops;
+extern const struct clk_ops zx_audio_div_ops;
+
#endif