Patch "clk: qcom: clk-krait: fix wrong div2 functions" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    clk: qcom: clk-krait: fix wrong div2 functions

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     clk-qcom-clk-krait-fix-wrong-div2-functions.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 74e6c571df0cae76c7e8d3c124db72027e7f29a1
Author: Christian Marangi <ansuelsmth@xxxxxxxxx>
Date:   Tue Nov 8 22:56:25 2022 +0100

    clk: qcom: clk-krait: fix wrong div2 functions
    
    [ Upstream commit d676d3a3717cf726d3affedbe5ba98fc4ccad7b3 ]
    
    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: 4d7dc77babfe ("clk: qcom: Add support for Krait clocks")
    Signed-off-by: Christian Marangi <ansuelsmth@xxxxxxxxx>
    Signed-off-by: Bjorn Andersson <andersson@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221108215625.30186-1-ansuelsmth@xxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/clk/qcom/clk-krait.c b/drivers/clk/qcom/clk-krait.c
index 90046428693c..e74fc81a14d0 100644
--- a/drivers/clk/qcom/clk-krait.c
+++ b/drivers/clk/qcom/clk-krait.c
@@ -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);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux