Skip to content

Commit 245090a

Browse files
jernejskbebarino
authored andcommitted
clk: sunxi-ng: mp: fix parent rate change flag check
CLK_SET_RATE_PARENT flag is checked on parent clock instead of current one. Fix that. Fixes: 3f79043 ("clk: sunxi-ng: Adjust MP clock parent rate when allowed") Reviewed-by: Chen-Yu Tsai <[email protected]> Tested-by: Andre Heider <[email protected]> Signed-off-by: Jernej Skrabec <[email protected]> Link: https://lore.kernel.org/r/[email protected] Acked-by: Maxime Ripard <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent c361c5a commit 245090a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/clk/sunxi-ng/ccu_mp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ static unsigned long ccu_mp_round_rate(struct ccu_mux_internal *mux,
108108
max_m = cmp->m.max ?: 1 << cmp->m.width;
109109
max_p = cmp->p.max ?: 1 << ((1 << cmp->p.width) - 1);
110110

111-
if (!(clk_hw_get_flags(hw) & CLK_SET_RATE_PARENT)) {
111+
if (!clk_hw_can_set_rate_parent(&cmp->common.hw)) {
112112
ccu_mp_find_best(*parent_rate, rate, max_m, max_p, &m, &p);
113113
rate = *parent_rate / p / m;
114114
} else {

0 commit comments

Comments
 (0)