diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2016-09-30 22:16:51 +0200 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@free-electrons.com> | 2016-10-25 12:40:25 +0200 |
commit | 2beaa601c849e72683a2dd0fe6fd77763f19f051 (patch) | |
tree | 5c13edaa94dd1b5e876e8294c478d571826fde25 /drivers/clk/sunxi-ng/ccu_nk.c | |
parent | 6e0d50daa97f4bf9706e343b4f71171e88921209 (diff) | |
download | linux-next-2beaa601c849e72683a2dd0fe6fd77763f19f051.tar.gz |
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_nk.c')
-rw-r--r-- | drivers/clk/sunxi-ng/ccu_nk.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/clk/sunxi-ng/ccu_nk.c b/drivers/clk/sunxi-ng/ccu_nk.c index a42d870ba0ef..eaf0fdf78d2b 100644 --- a/drivers/clk/sunxi-ng/ccu_nk.c +++ b/drivers/clk/sunxi-ng/ccu_nk.c @@ -97,9 +97,9 @@ static long ccu_nk_round_rate(struct clk_hw *hw, unsigned long rate, if (nk->common.features & CCU_FEATURE_FIXED_POSTDIV) rate *= nk->fixed_post_div; - _nk.min_n = 1; + _nk.min_n = nk->n.min; _nk.max_n = 1 << nk->n.width; - _nk.min_k = 1; + _nk.min_k = nk->k.min; _nk.max_k = 1 << nk->k.width; ccu_nk_find_best(*parent_rate, rate, &_nk); @@ -122,9 +122,9 @@ static int ccu_nk_set_rate(struct clk_hw *hw, unsigned long rate, if (nk->common.features & CCU_FEATURE_FIXED_POSTDIV) rate = rate * nk->fixed_post_div; - _nk.min_n = 1; + _nk.min_n = nk->n.min; _nk.max_n = 1 << nk->n.width; - _nk.min_k = 1; + _nk.min_k = nk->k.min; _nk.max_k = 1 << nk->k.width; ccu_nk_find_best(parent_rate, rate, &_nk); |