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>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user