|
@@ -38,6 +38,7 @@ struct ccu_nm {
|
|
|
|
|
|
unsigned int fixed_post_div;
|
|
|
unsigned int min_rate;
|
|
|
+ unsigned int max_rate;
|
|
|
|
|
|
struct ccu_common common;
|
|
|
};
|
|
@@ -115,6 +116,35 @@ struct ccu_nm {
|
|
|
}, \
|
|
|
}
|
|
|
|
|
|
+#define SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK_MIN_MAX(_struct, _name, \
|
|
|
+ _parent, _reg, \
|
|
|
+ _min_rate, _max_rate, \
|
|
|
+ _nshift, _nwidth, \
|
|
|
+ _mshift, _mwidth, \
|
|
|
+ _frac_en, _frac_sel, \
|
|
|
+ _frac_rate_0, \
|
|
|
+ _frac_rate_1, \
|
|
|
+ _gate, _lock, _flags) \
|
|
|
+ struct ccu_nm _struct = { \
|
|
|
+ .enable = _gate, \
|
|
|
+ .lock = _lock, \
|
|
|
+ .n = _SUNXI_CCU_MULT(_nshift, _nwidth), \
|
|
|
+ .m = _SUNXI_CCU_DIV(_mshift, _mwidth), \
|
|
|
+ .frac = _SUNXI_CCU_FRAC(_frac_en, _frac_sel, \
|
|
|
+ _frac_rate_0, \
|
|
|
+ _frac_rate_1), \
|
|
|
+ .min_rate = _min_rate, \
|
|
|
+ .max_rate = _max_rate, \
|
|
|
+ .common = { \
|
|
|
+ .reg = _reg, \
|
|
|
+ .features = CCU_FEATURE_FRACTIONAL, \
|
|
|
+ .hw.init = CLK_HW_INIT(_name, \
|
|
|
+ _parent, \
|
|
|
+ &ccu_nm_ops, \
|
|
|
+ _flags), \
|
|
|
+ }, \
|
|
|
+ }
|
|
|
+
|
|
|
#define SUNXI_CCU_NM_WITH_GATE_LOCK(_struct, _name, _parent, _reg, \
|
|
|
_nshift, _nwidth, \
|
|
|
_mshift, _mwidth, \
|