Patch "clk: tegra: Ensure that PLLU configuration is applied properly" has been added to the 5.4-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: tegra: Ensure that PLLU configuration is applied properly

to the 5.4-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-tegra-ensure-that-pllu-configuration-is-applied-.patch
and it can be found in the queue-5.4 subdirectory.

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



commit 55475b712faebfa96e58ac50e7491576cb51e781
Author: Dmitry Osipenko <digetx@xxxxxxxxx>
Date:   Sun May 16 19:30:35 2021 +0300

    clk: tegra: Ensure that PLLU configuration is applied properly
    
    [ Upstream commit a7196048cd5168096c2c4f44a3939d7a6dcd06b9 ]
    
    The PLLU (USB) consists of the PLL configuration itself and configuration
    of the PLLU outputs. The PLLU programming is inconsistent on T30 vs T114,
    where T114 immediately bails out if PLLU is enabled and T30 re-enables
    a potentially already enabled PLL (left after bootloader) and then fully
    reprograms it, which could be unsafe to do. The correct way should be to
    skip enabling of the PLL if it's already enabled and then apply
    configuration to the outputs. This patch doesn't fix any known problems,
    it's a minor improvement.
    
    Acked-by: Thierry Reding <treding@xxxxxxxxxx>
    Signed-off-by: Dmitry Osipenko <digetx@xxxxxxxxx>
    Signed-off-by: Thierry Reding <treding@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/clk/tegra/clk-pll.c b/drivers/clk/tegra/clk-pll.c
index 80f640d9ea71..24ecfc114d41 100644
--- a/drivers/clk/tegra/clk-pll.c
+++ b/drivers/clk/tegra/clk-pll.c
@@ -1089,7 +1089,8 @@ static int clk_pllu_enable(struct clk_hw *hw)
 	if (pll->lock)
 		spin_lock_irqsave(pll->lock, flags);
 
-	_clk_pll_enable(hw);
+	if (!clk_pll_is_enabled(hw))
+		_clk_pll_enable(hw);
 
 	ret = clk_pll_wait_for_lock(pll);
 	if (ret < 0)
@@ -1706,15 +1707,13 @@ static int clk_pllu_tegra114_enable(struct clk_hw *hw)
 		return -EINVAL;
 	}
 
-	if (clk_pll_is_enabled(hw))
-		return 0;
-
 	input_rate = clk_hw_get_rate(__clk_get_hw(osc));
 
 	if (pll->lock)
 		spin_lock_irqsave(pll->lock, flags);
 
-	_clk_pll_enable(hw);
+	if (!clk_pll_is_enabled(hw))
+		_clk_pll_enable(hw);
 
 	ret = clk_pll_wait_for_lock(pll);
 	if (ret < 0)



[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