]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
clk: qcom: gcc-sm8250: Do not turn off PCIe GDSCs during gdsc_disable()
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Fri, 19 Jul 2024 13:42:38 +0000 (19:12 +0530)
committerBjorn Andersson <andersson@kernel.org>
Mon, 29 Jul 2024 03:15:22 +0000 (22:15 -0500)
With PWRSTS_OFF_ON, PCIe GDSCs are turned off during gdsc_disable(). This
can happen during scenarios such as system suspend and breaks the resume
of PCIe controllers from suspend.

So use PWRSTS_RET_ON to indicate the GDSC driver to not turn off the GDSCs
during gdsc_disable() and allow the hardware to transition the GDSCs to
retention when the parent domain enters low power state during system
suspend.

Cc: stable@vger.kernel.org # 5.7
Fixes: 3e5770921a88 ("clk: qcom: gcc: Add global clock controller driver for SM8250")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20240719134238.312191-1-manivannan.sadhasivam@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/clk/qcom/gcc-sm8250.c

index 991cd8b8d59726b3350e2a571c430ef47f5a512a..1c59d70e0f96c5b01282daf8f40f527fe4ee0f8a 100644 (file)
@@ -3226,7 +3226,7 @@ static struct gdsc pcie_0_gdsc = {
        .pd = {
                .name = "pcie_0_gdsc",
        },
-       .pwrsts = PWRSTS_OFF_ON,
+       .pwrsts = PWRSTS_RET_ON,
 };
 
 static struct gdsc pcie_1_gdsc = {
@@ -3234,7 +3234,7 @@ static struct gdsc pcie_1_gdsc = {
        .pd = {
                .name = "pcie_1_gdsc",
        },
-       .pwrsts = PWRSTS_OFF_ON,
+       .pwrsts = PWRSTS_RET_ON,
 };
 
 static struct gdsc pcie_2_gdsc = {
@@ -3242,7 +3242,7 @@ static struct gdsc pcie_2_gdsc = {
        .pd = {
                .name = "pcie_2_gdsc",
        },
-       .pwrsts = PWRSTS_OFF_ON,
+       .pwrsts = PWRSTS_RET_ON,
 };
 
 static struct gdsc ufs_card_gdsc = {