summaryrefslogtreecommitdiff
path: root/drivers/clk/sunxi-ng/ccu_mult.h
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@free-electrons.com>2016-09-30 23:16:51 +0300
committerMaxime Ripard <maxime.ripard@free-electrons.com>2016-10-25 13:40:25 +0300
commit2beaa601c849e72683a2dd0fe6fd77763f19f051 (patch)
tree5c13edaa94dd1b5e876e8294c478d571826fde25 /drivers/clk/sunxi-ng/ccu_mult.h
parent6e0d50daa97f4bf9706e343b4f71171e88921209 (diff)
downloadlinux-2beaa601c849e72683a2dd0fe6fd77763f19f051.tar.xz
clk: sunxi-ng: Implement minimum for multipliers
Allow the CCU drivers to specify a multiplier for their clocks. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Chen-Yu Tsai <wens@csie.org>
Diffstat (limited to 'drivers/clk/sunxi-ng/ccu_mult.h')
-rw-r--r--drivers/clk/sunxi-ng/ccu_mult.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/clk/sunxi-ng/ccu_mult.h b/drivers/clk/sunxi-ng/ccu_mult.h
index 113780b7558e..c1a2134bdc71 100644
--- a/drivers/clk/sunxi-ng/ccu_mult.h
+++ b/drivers/clk/sunxi-ng/ccu_mult.h
@@ -7,14 +7,19 @@
struct ccu_mult_internal {
u8 shift;
u8 width;
+ u8 min;
};
-#define _SUNXI_CCU_MULT(_shift, _width) \
- { \
- .shift = _shift, \
- .width = _width, \
+#define _SUNXI_CCU_MULT_MIN(_shift, _width, _min) \
+ { \
+ .shift = _shift, \
+ .width = _width, \
+ .min = _min, \
}
+#define _SUNXI_CCU_MULT(_shift, _width) \
+ _SUNXI_CCU_MULT_MIN(_shift, _width, 1)
+
struct ccu_mult {
u32 enable;