]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
clk: qcom: gcc-sm8650: Do not turn off PCIe GDSCs during gdsc_disable()
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Thu, 19 Dec 2024 17:00:11 +0000 (22:30 +0530)
committerBjorn Andersson <andersson@kernel.org>
Thu, 26 Dec 2024 04:03:18 +0000 (22:03 -0600)
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 # 6.8
Fixes: c58225b7e3d7 ("clk: qcom: add the SM8650 Global Clock Controller driver, part 1")
Reported-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on QRD8650
Link: https://lore.kernel.org/r/20241219170011.70140-2-manivannan.sadhasivam@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/clk/qcom/gcc-sm8650.c

index fd9d6544bdd53a8df68493b6bb097bc5f5afa20b..9dd5c48f33bed5b944a0b25959ef69e7862d0449 100644 (file)
@@ -3437,7 +3437,7 @@ static struct gdsc pcie_0_gdsc = {
        .pd = {
                .name = "pcie_0_gdsc",
        },
-       .pwrsts = PWRSTS_OFF_ON,
+       .pwrsts = PWRSTS_RET_ON,
        .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE | VOTABLE,
 };
 
@@ -3448,7 +3448,7 @@ static struct gdsc pcie_0_phy_gdsc = {
        .pd = {
                .name = "pcie_0_phy_gdsc",
        },
-       .pwrsts = PWRSTS_OFF_ON,
+       .pwrsts = PWRSTS_RET_ON,
        .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE | VOTABLE,
 };
 
@@ -3459,7 +3459,7 @@ static struct gdsc pcie_1_gdsc = {
        .pd = {
                .name = "pcie_1_gdsc",
        },
-       .pwrsts = PWRSTS_OFF_ON,
+       .pwrsts = PWRSTS_RET_ON,
        .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE | VOTABLE,
 };
 
@@ -3470,7 +3470,7 @@ static struct gdsc pcie_1_phy_gdsc = {
        .pd = {
                .name = "pcie_1_phy_gdsc",
        },
-       .pwrsts = PWRSTS_OFF_ON,
+       .pwrsts = PWRSTS_RET_ON,
        .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE | VOTABLE,
 };