]> git.baikalelectronics.ru Git - kernel.git/commit
clk: qcom: clk-krait: fix wrong div2 functions
authorChristian Marangi <ansuelsmth@gmail.com>
Tue, 8 Nov 2022 21:56:25 +0000 (22:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:09 +0000 (11:41 +0100)
commit918221ad078b8b537f80c30a80b57ea46362a7b7
treeadf32ce122166fafa22f449b5e5632b7b03072d2
parent1790d42914e3e52db400da038d287417bbc5ca5d
clk: qcom: clk-krait: fix wrong div2 functions

[ Upstream commit a87c2648c8255c66e725b64bdc787d12b7b50281 ]

Currently div2 value is applied to the wrong bits. This is caused by a
bug in the code where the shift is done only for lpl, for anything
else the mask is not shifted to the correct bits.

Fix this by correctly shift if lpl is not supported.

Fixes: 65ea4c3caf1c ("clk: qcom: Add support for Krait clocks")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221108215625.30186-1-ansuelsmth@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/qcom/clk-krait.c