hwrng: core - Don't use a stack buffer in add_early_randomness()
[linux/fpc-iii.git] / drivers / clk / sunxi-ng / ccu_mult.h
blob5d2c8dc14073337a3573f61df8cefdfd1a09c694
1 #ifndef _CCU_MULT_H_
2 #define _CCU_MULT_H_
4 #include "ccu_common.h"
5 #include "ccu_mux.h"
7 struct _ccu_mult {
8 u8 shift;
9 u8 width;
12 #define _SUNXI_CCU_MULT(_shift, _width) \
13 { \
14 .shift = _shift, \
15 .width = _width, \
18 struct ccu_mult {
19 u32 enable;
21 struct _ccu_mult mult;
22 struct ccu_mux_internal mux;
23 struct ccu_common common;
26 #define SUNXI_CCU_N_WITH_GATE_LOCK(_struct, _name, _parent, _reg, \
27 _mshift, _mwidth, _gate, _lock, \
28 _flags) \
29 struct ccu_mult _struct = { \
30 .enable = _gate, \
31 .mult = _SUNXI_CCU_MULT(_mshift, _mwidth), \
32 .common = { \
33 .reg = _reg, \
34 .hw.init = CLK_HW_INIT(_name, \
35 _parent, \
36 &ccu_mult_ops, \
37 _flags), \
38 }, \
41 static inline struct ccu_mult *hw_to_ccu_mult(struct clk_hw *hw)
43 struct ccu_common *common = hw_to_ccu_common(hw);
45 return container_of(common, struct ccu_mult, common);
48 extern const struct clk_ops ccu_mult_ops;
50 #endif /* _CCU_MULT_H_ */