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

clk: qcom: gcc-sm8250: 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 # 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>

authored by

Manivannan Sadhasivam and committed by
Bjorn Andersson
ade508b5 da3c15ea

+3 -3
+3 -3
drivers/clk/qcom/gcc-sm8250.c
··· 3226 3226 .pd = { 3227 3227 .name = "pcie_0_gdsc", 3228 3228 }, 3229 - .pwrsts = PWRSTS_OFF_ON, 3229 + .pwrsts = PWRSTS_RET_ON, 3230 3230 }; 3231 3231 3232 3232 static struct gdsc pcie_1_gdsc = { ··· 3234 3234 .pd = { 3235 3235 .name = "pcie_1_gdsc", 3236 3236 }, 3237 - .pwrsts = PWRSTS_OFF_ON, 3237 + .pwrsts = PWRSTS_RET_ON, 3238 3238 }; 3239 3239 3240 3240 static struct gdsc pcie_2_gdsc = { ··· 3242 3242 .pd = { 3243 3243 .name = "pcie_2_gdsc", 3244 3244 }, 3245 - .pwrsts = PWRSTS_OFF_ON, 3245 + .pwrsts = PWRSTS_RET_ON, 3246 3246 }; 3247 3247 3248 3248 static struct gdsc ufs_card_gdsc = {