]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
clk: qcom: Don't overwrite 'cfg' in clk_rcg2_dfs_populate_freq()
authorStephen Boyd <sboyd@kernel.org>
Tue, 28 Jan 2020 19:33:29 +0000 (11:33 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Feb 2020 07:36:32 +0000 (08:36 +0100)
commit8d122cd0d2663e6ad9742d0127aef42e68850c56
tree6fb2594c4f2a4ba46623b9d573b963229573e5b1
parent8ba34cdadba3807b04e1349189b315c758835b30
clk: qcom: Don't overwrite 'cfg' in clk_rcg2_dfs_populate_freq()

[ Upstream commit 21e157c62eeded8b1558a991b4820b761d48a730 ]

The DFS frequency table logic overwrites 'cfg' while detecting the
parent clk and then later on in clk_rcg2_dfs_populate_freq() we use that
same variable to figure out the mode of the clk, either MND or not. Add
a new variable to hold the parent clk bit so that 'cfg' is left
untouched for use later.

This fixes problems in detecting the supported frequencies for any clks
in DFS mode.

Fixes: cc4f6944d0e3 ("clk: qcom: Add support for RCG to register for DFS")
Reported-by: Rajendra Nayak <rnayak@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lkml.kernel.org/r/20200128193329.45635-1-sboyd@kernel.org
Tested-by: Rajendra Nayak <rnayak@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/qcom/clk-rcg2.c