summaryrefslogtreecommitdiff
path: root/drivers/clk
diff options
context:
space:
mode:
authorJernej Skrabec <jernej.skrabec@siol.net>2021-02-09 18:58:56 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-02-17 10:35:18 +0100
commit546d92a43c94e1f166e151f9d84142d91c8bc6e2 (patch)
tree3ad58068d9b822f45aedb87e9140f18531147632 /drivers/clk
parentb02db23d2647c7c610eee74aaaaa33eae90c72fa (diff)
downloadlinux-546d92a43c94e1f166e151f9d84142d91c8bc6e2.tar.gz
linux-546d92a43c94e1f166e151f9d84142d91c8bc6e2.tar.bz2
linux-546d92a43c94e1f166e151f9d84142d91c8bc6e2.zip
clk: sunxi-ng: mp: fix parent rate change flag check
[ Upstream commit 245090ab2636c0869527ce563afbfb8aff29e825 ] CLK_SET_RATE_PARENT flag is checked on parent clock instead of current one. Fix that. Fixes: 3f790433c3cb ("clk: sunxi-ng: Adjust MP clock parent rate when allowed") Reviewed-by: Chen-Yu Tsai <wens@csie.org> Tested-by: Andre Heider <a.heider@gmail.com> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Link: https://lore.kernel.org/r/20210209175900.7092-2-jernej.skrabec@siol.net Acked-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/sunxi-ng/ccu_mp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/sunxi-ng/ccu_mp.c b/drivers/clk/sunxi-ng/ccu_mp.c
index fa4ecb915590..9d3a76604d94 100644
--- a/drivers/clk/sunxi-ng/ccu_mp.c
+++ b/drivers/clk/sunxi-ng/ccu_mp.c
@@ -108,7 +108,7 @@ static unsigned long ccu_mp_round_rate(struct ccu_mux_internal *mux,
max_m = cmp->m.max ?: 1 << cmp->m.width;
max_p = cmp->p.max ?: 1 << ((1 << cmp->p.width) - 1);
- if (!(clk_hw_get_flags(hw) & CLK_SET_RATE_PARENT)) {
+ if (!clk_hw_can_set_rate_parent(&cmp->common.hw)) {
ccu_mp_find_best(*parent_rate, rate, max_m, max_p, &m, &p);
rate = *parent_rate / p / m;
} else {