Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: qcom: gcc-sm8550: Do not turn off PCIe GDSCs during gdsc_disable()

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.2
Fixes: 955f2ea3b9e9 ("clk: qcom: Add GCC driver for SM8550")
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 QRD8550
Link: https://lore.kernel.org/r/20241219170011.70140-1-manivannan.sadhasivam@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>

authored by

Manivannan Sadhasivam and committed by
Bjorn Andersson
967e0110 99c21c7c

+4 -4
+4 -4
drivers/clk/qcom/gcc-sm8550.c
··· 3003 3003 .pd = { 3004 3004 .name = "pcie_0_gdsc", 3005 3005 }, 3006 - .pwrsts = PWRSTS_OFF_ON, 3006 + .pwrsts = PWRSTS_RET_ON, 3007 3007 .flags = VOTABLE | POLL_CFG_GDSCR | RETAIN_FF_ENABLE, 3008 3008 }; 3009 3009 ··· 3014 3014 .pd = { 3015 3015 .name = "pcie_0_phy_gdsc", 3016 3016 }, 3017 - .pwrsts = PWRSTS_OFF_ON, 3017 + .pwrsts = PWRSTS_RET_ON, 3018 3018 .flags = VOTABLE | POLL_CFG_GDSCR | RETAIN_FF_ENABLE, 3019 3019 }; 3020 3020 ··· 3025 3025 .pd = { 3026 3026 .name = "pcie_1_gdsc", 3027 3027 }, 3028 - .pwrsts = PWRSTS_OFF_ON, 3028 + .pwrsts = PWRSTS_RET_ON, 3029 3029 .flags = VOTABLE | POLL_CFG_GDSCR | RETAIN_FF_ENABLE, 3030 3030 }; 3031 3031 ··· 3036 3036 .pd = { 3037 3037 .name = "pcie_1_phy_gdsc", 3038 3038 }, 3039 - .pwrsts = PWRSTS_OFF_ON, 3039 + .pwrsts = PWRSTS_RET_ON, 3040 3040 .flags = VOTABLE | POLL_CFG_GDSCR | RETAIN_FF_ENABLE, 3041 3041 }; 3042 3042