mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 04:04:06 +00:00
clk: qcom: clk-krait: fix wrong div2 functions
[ Upstream commitd676d3a371
] 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:4d7dc77bab
("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>
This commit is contained in:
parent
04dbd2a4a6
commit
c495de13c8
1 changed files with 2 additions and 0 deletions
|
@ -98,6 +98,8 @@ static int krait_div2_set_rate(struct clk_hw *hw, unsigned long rate,
|
|||
|
||||
if (d->lpl)
|
||||
mask = mask << (d->shift + LPL_SHIFT) | mask << d->shift;
|
||||
else
|
||||
mask <<= d->shift;
|
||||
|
||||
spin_lock_irqsave(&krait_clock_reg_lock, flags);
|
||||
val = krait_get_l2_indirect_reg(d->offset);
|
||||
|
|
Loading…
Add table
Reference in a new issue