summaryrefslogtreecommitdiff
path: root/drivers/clk/sunxi-ng/ccu_mult.c
diff options
context:
space:
mode:
authorJernej Škrabec <jernej.skrabec@siol.net>2017-07-30 19:41:48 +0300
committerChen-Yu Tsai <wens@csie.org>2017-08-01 05:18:22 +0300
commit1e92ae651e766603d9c582ff356abf96ae90d933 (patch)
treebe1c08ab68bfae5b3865d71a1c6c6de12b8bfddf /drivers/clk/sunxi-ng/ccu_mult.c
parentb64dfec01050a010fa764dae3746353bdbdecfe1 (diff)
downloadlinux-1e92ae651e766603d9c582ff356abf96ae90d933.tar.xz
clk: sunxi-ng: multiplier: Fix fractional mode
Driver for multiplier clock is missing a call to ccu_frac_helper_enable() when fractional mode is selected. Add a call to ccu_frac_helper_enable(). Fixes: d77e8135b340 ("clk: sunxi-ng: multiplier: Add fractional support") Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Diffstat (limited to 'drivers/clk/sunxi-ng/ccu_mult.c')
-rw-r--r--drivers/clk/sunxi-ng/ccu_mult.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/clk/sunxi-ng/ccu_mult.c b/drivers/clk/sunxi-ng/ccu_mult.c
index 20d0300867f2..ee5e96222cb2 100644
--- a/drivers/clk/sunxi-ng/ccu_mult.c
+++ b/drivers/clk/sunxi-ng/ccu_mult.c
@@ -111,10 +111,13 @@ static int ccu_mult_set_rate(struct clk_hw *hw, unsigned long rate,
unsigned long flags;
u32 reg;
- if (ccu_frac_helper_has_rate(&cm->common, &cm->frac, rate))
+ if (ccu_frac_helper_has_rate(&cm->common, &cm->frac, rate)) {
+ ccu_frac_helper_enable(&cm->common, &cm->frac);
+
return ccu_frac_helper_set_rate(&cm->common, &cm->frac, rate);
- else
+ } else {
ccu_frac_helper_disable(&cm->common, &cm->frac);
+ }
parent_rate = ccu_mux_helper_apply_prediv(&cm->common, &cm->mux, -1,
parent_rate);