]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/clk/sunxi-ng/ccu_mult.h
Merge tag 'batadv-net-for-davem-20170301' of git://git.open-mesh.org/linux-merge
[karo-tx-linux.git] / drivers / clk / sunxi-ng / ccu_mult.h
index c1a2134bdc711367d239b237f5dae01f1e6af07b..524acddfcb2eaf480b992b4f9761ad9b46fb8d70 100644 (file)
@@ -2,27 +2,39 @@
 #define _CCU_MULT_H_
 
 #include "ccu_common.h"
+#include "ccu_frac.h"
 #include "ccu_mux.h"
 
 struct ccu_mult_internal {
+       u8      offset;
        u8      shift;
        u8      width;
        u8      min;
+       u8      max;
 };
 
-#define _SUNXI_CCU_MULT_MIN(_shift, _width, _min)      \
-       {                                               \
-               .shift  = _shift,                       \
-               .width  = _width,                       \
-               .min    = _min,                         \
+#define _SUNXI_CCU_MULT_OFFSET_MIN_MAX(_shift, _width, _offset, _min, _max) \
+       {                                                               \
+               .min    = _min,                                         \
+               .max    = _max,                                         \
+               .offset = _offset,                                      \
+               .shift  = _shift,                                       \
+               .width  = _width,                                       \
        }
 
+#define _SUNXI_CCU_MULT_MIN(_shift, _width, _min)      \
+       _SUNXI_CCU_MULT_OFFSET_MIN_MAX(_shift, _width, 1, _min, 0)
+
+#define _SUNXI_CCU_MULT_OFFSET(_shift, _width, _offset)        \
+       _SUNXI_CCU_MULT_OFFSET_MIN_MAX(_shift, _width, _offset, 1, 0)
+
 #define _SUNXI_CCU_MULT(_shift, _width)                \
-       _SUNXI_CCU_MULT_MIN(_shift, _width, 1)
+       _SUNXI_CCU_MULT_OFFSET_MIN_MAX(_shift, _width, 1, 1, 0)
 
 struct ccu_mult {
        u32                     enable;
 
+       struct ccu_frac_internal        frac;
        struct ccu_mult_internal        mult;
        struct ccu_mux_internal mux;
        struct ccu_common       common;