Commit c9520be3 authored by Maxime Ripard's avatar Maxime Ripard

clk: sunxi-ng: mult: Fix minimum in round rate

The previous code was always taking 1 as the minimum in it's round_rate
function, ignoring entirely what was set as minimum in the clock
definition.

Make sure that's not the case anymore.

Fixes: 2beaa601 ("clk: sunxi-ng: Implement minimum for multipliers")
Acked-by: default avatarChen-Yu Tsai <wens@csie.org>
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
parent e66f81bb
...@@ -40,7 +40,7 @@ static unsigned long ccu_mult_round_rate(struct ccu_mux_internal *mux, ...@@ -40,7 +40,7 @@ static unsigned long ccu_mult_round_rate(struct ccu_mux_internal *mux,
struct ccu_mult *cm = data; struct ccu_mult *cm = data;
struct _ccu_mult _cm; struct _ccu_mult _cm;
_cm.min = 1; _cm.min = cm->mult.min;
_cm.max = 1 << cm->mult.width; _cm.max = 1 << cm->mult.width;
ccu_mult_find_best(parent_rate, rate, &_cm); ccu_mult_find_best(parent_rate, rate, &_cm);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment