aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Turquette <mturquette@baylibre.com>2016-06-07 19:00:55 -0400
committerMichael Turquette <mturquette@baylibre.com>2016-06-22 21:02:56 -0400
commit73de5c8bcf4924faf5d57c3d626b01a04ed1ee41 (patch)
treed677cb72aea06a9e421da3cef5a9522f2d9e7cea
parentcb7c47d7066ca9fda053f5cb327ea49e14f42409 (diff)
clk: meson: add peripheral gate macro
There are a series of peripheral and system gate clocks that fan out from the clk81 signal. Add a helper macro to statically initialize these gate clocks. Tested-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Michael Turquette <mturquette@baylibre.com>
-rw-r--r--drivers/clk/meson/clkc.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/clk/meson/clkc.h b/drivers/clk/meson/clkc.h
index f3f396168ba4..9436932880c0 100644
--- a/drivers/clk/meson/clkc.h
+++ b/drivers/clk/meson/clkc.h
@@ -73,6 +73,20 @@ struct meson_clk_cpu {
73int meson_clk_cpu_notifier_cb(struct notifier_block *nb, unsigned long event, 73int meson_clk_cpu_notifier_cb(struct notifier_block *nb, unsigned long event,
74 void *data); 74 void *data);
75 75
76#define MESON_GATE(_name, _reg, _bit) \
77struct clk_gate gxbb_##_name = { \
78 .reg = (void __iomem *) _reg, \
79 .bit_idx = (_bit), \
80 .lock = &clk_lock, \
81 .hw.init = &(struct clk_init_data) { \
82 .name = #_name, \
83 .ops = &clk_gate_ops, \
84 .parent_names = (const char *[]){ "clk81" }, \
85 .num_parents = 1, \
86 .flags = (CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED), \
87 }, \
88};
89
76/* clk_ops */ 90/* clk_ops */
77extern const struct clk_ops meson_clk_pll_ro_ops; 91extern const struct clk_ops meson_clk_pll_ro_ops;
78extern const struct clk_ops meson_clk_pll_ops; 92extern const struct clk_ops meson_clk_pll_ops;