sh_eth: fix EESIPR values for SH77{34|63}
[linux/fpc-iii.git] / drivers / clk / sunxi-ng / ccu_mult.h
blobc1a2134bdc711367d239b237f5dae01f1e6af07b
1 #ifndef _CCU_MULT_H_
2 #define _CCU_MULT_H_
4 #include "ccu_common.h"
5 #include "ccu_mux.h"
7 struct ccu_mult_internal {
8 u8 shift;
9 u8 width;
10 u8 min;
13 #define _SUNXI_CCU_MULT_MIN(_shift, _width, _min) \
14 { \
15 .shift = _shift, \
16 .width = _width, \
17 .min = _min, \
20 #define _SUNXI_CCU_MULT(_shift, _width) \
21 _SUNXI_CCU_MULT_MIN(_shift, _width, 1)
23 struct ccu_mult {
24 u32 enable;
26 struct ccu_mult_internal mult;
27 struct ccu_mux_internal mux;
28 struct ccu_common common;
31 #define SUNXI_CCU_N_WITH_GATE_LOCK(_struct, _name, _parent, _reg, \
32 _mshift, _mwidth, _gate, _lock, \
33 _flags) \
34 struct ccu_mult _struct = { \
35 .enable = _gate, \
36 .mult = _SUNXI_CCU_MULT(_mshift, _mwidth), \
37 .common = { \
38 .reg = _reg, \
39 .hw.init = CLK_HW_INIT(_name, \
40 _parent, \
41 &ccu_mult_ops, \
42 _flags), \
43 }, \
46 static inline struct ccu_mult *hw_to_ccu_mult(struct clk_hw *hw)
48 struct ccu_common *common = hw_to_ccu_common(hw);
50 return container_of(common, struct ccu_mult, common);
53 extern const struct clk_ops ccu_mult_ops;
55 #endif /* _CCU_MULT_H_ */