summaryrefslogtreecommitdiff
path: root/drivers/clk/meson/clk-regmap.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clk/meson/clk-regmap.h')
-rw-r--r--drivers/clk/meson/clk-regmap.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/clk/meson/clk-regmap.h b/drivers/clk/meson/clk-regmap.h
index b7a085bbf072..1dd0abe3ba91 100644
--- a/drivers/clk/meson/clk-regmap.h
+++ b/drivers/clk/meson/clk-regmap.h
@@ -111,7 +111,7 @@ clk_get_regmap_mux_data(struct clk_regmap *clk)
extern const struct clk_ops clk_regmap_mux_ops;
extern const struct clk_ops clk_regmap_mux_ro_ops;
-#define MESON_GATE(_name, _reg, _bit) \
+#define __MESON_GATE(_name, _reg, _bit, _ops) \
struct clk_regmap _name = { \
.data = &(struct clk_regmap_gate_data){ \
.offset = (_reg), \
@@ -119,11 +119,16 @@ struct clk_regmap _name = { \
}, \
.hw.init = &(struct clk_init_data) { \
.name = #_name, \
- .ops = &clk_regmap_gate_ops, \
+ .ops = _ops, \
.parent_names = (const char *[]){ "clk81" }, \
.num_parents = 1, \
.flags = (CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED), \
}, \
}
+#define MESON_GATE(_name, _reg, _bit) \
+ __MESON_GATE(_name, _reg, _bit, &clk_regmap_gate_ops)
+
+#define MESON_GATE_RO(_name, _reg, _bit) \
+ __MESON_GATE(_name, _reg, _bit, &clk_regmap_gate_ro_ops)
#endif /* __CLK_REGMAP_H */