Skip to content

Commit 5dbee35

Browse files
ziyao233pdp7
authored andcommitted
clk: thead: th1520-ap: Add macro to define multiplexers with flags
The new macro, TH_CCU_MUX_FLAGS, extends TH_CCU_MUX macro by adding two parameters to specify clock flags and multiplexer flags. Reviewed-by: Drew Fustini <fustini@kernel.org> Signed-off-by: Yao Zi <ziyao@disroot.org> Signed-off-by: Drew Fustini <fustini@kernel.org>
1 parent 238cc63 commit 5dbee35

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

drivers/clk/thead/clk-th1520-ap.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,17 +101,22 @@ struct ccu_pll {
101101
.flags = _flags, \
102102
}
103103

104-
#define TH_CCU_MUX(_name, _parents, _shift, _width) \
104+
#define TH_CCU_MUX_FLAGS(_name, _parents, _shift, _width, _flags, \
105+
_mux_flags) \
105106
{ \
106107
.mask = GENMASK(_width - 1, 0), \
107108
.shift = _shift, \
109+
.flags = _mux_flags, \
108110
.hw.init = CLK_HW_INIT_PARENTS_DATA( \
109111
_name, \
110112
_parents, \
111113
&clk_mux_ops, \
112-
0), \
114+
_flags), \
113115
}
114116

117+
#define TH_CCU_MUX(_name, _parents, _shift, _width) \
118+
TH_CCU_MUX_FLAGS(_name, _parents, _shift, _width, 0, 0)
119+
115120
#define CCU_GATE(_clkid, _struct, _name, _parent, _reg, _bit, _flags) \
116121
struct ccu_gate _struct = { \
117122
.clkid = _clkid, \

0 commit comments

Comments
 (0)