* [PATCH 1/2] clk: qcom: gcc-sm8550: Do not turn off PCIe GDSCs during gdsc_disable()
@ 2024-12-19 17:00 Manivannan Sadhasivam
2024-12-19 17:00 ` [PATCH 2/2] clk: qcom: gcc-sm8650: " Manivannan Sadhasivam
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Manivannan Sadhasivam @ 2024-12-19 17:00 UTC (permalink / raw)
To: andersson, mturquette, sboyd
Cc: linux-arm-msm, linux-clk, linux-kernel, Manivannan Sadhasivam,
stable, Neil Armstrong
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>
---
drivers/clk/qcom/gcc-sm8550.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/clk/qcom/gcc-sm8550.c b/drivers/clk/qcom/gcc-sm8550.c
index 5abaeddd6afc..862a9bf73bcb 100644
--- a/drivers/clk/qcom/gcc-sm8550.c
+++ b/drivers/clk/qcom/gcc-sm8550.c
@@ -3003,7 +3003,7 @@ static struct gdsc pcie_0_gdsc = {
.pd = {
.name = "pcie_0_gdsc",
},
- .pwrsts = PWRSTS_OFF_ON,
+ .pwrsts = PWRSTS_RET_ON,
.flags = VOTABLE | POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};
@@ -3014,7 +3014,7 @@ static struct gdsc pcie_0_phy_gdsc = {
.pd = {
.name = "pcie_0_phy_gdsc",
},
- .pwrsts = PWRSTS_OFF_ON,
+ .pwrsts = PWRSTS_RET_ON,
.flags = VOTABLE | POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};
@@ -3025,7 +3025,7 @@ static struct gdsc pcie_1_gdsc = {
.pd = {
.name = "pcie_1_gdsc",
},
- .pwrsts = PWRSTS_OFF_ON,
+ .pwrsts = PWRSTS_RET_ON,
.flags = VOTABLE | POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};
@@ -3036,7 +3036,7 @@ static struct gdsc pcie_1_phy_gdsc = {
.pd = {
.name = "pcie_1_phy_gdsc",
},
- .pwrsts = PWRSTS_OFF_ON,
+ .pwrsts = PWRSTS_RET_ON,
.flags = VOTABLE | POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};
--
2.25.1
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 2/2] clk: qcom: gcc-sm8650: Do not turn off PCIe GDSCs during gdsc_disable()
2024-12-19 17:00 [PATCH 1/2] clk: qcom: gcc-sm8550: Do not turn off PCIe GDSCs during gdsc_disable() Manivannan Sadhasivam
@ 2024-12-19 17:00 ` Manivannan Sadhasivam
2024-12-19 17:03 ` Neil Armstrong
2024-12-19 17:02 ` [PATCH 1/2] clk: qcom: gcc-sm8550: " Neil Armstrong
2024-12-26 18:26 ` (subset) " Bjorn Andersson
2 siblings, 1 reply; 5+ messages in thread
From: Manivannan Sadhasivam @ 2024-12-19 17:00 UTC (permalink / raw)
To: andersson, mturquette, sboyd
Cc: linux-arm-msm, linux-clk, linux-kernel, Manivannan Sadhasivam,
stable, Neil Armstrong
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>
---
drivers/clk/qcom/gcc-sm8650.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/clk/qcom/gcc-sm8650.c b/drivers/clk/qcom/gcc-sm8650.c
index fd9d6544bdd5..9dd5c48f33be 100644
--- a/drivers/clk/qcom/gcc-sm8650.c
+++ b/drivers/clk/qcom/gcc-sm8650.c
@@ -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,
};
--
2.25.1
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 2/2] clk: qcom: gcc-sm8650: Do not turn off PCIe GDSCs during gdsc_disable()
2024-12-19 17:00 ` [PATCH 2/2] clk: qcom: gcc-sm8650: " Manivannan Sadhasivam
@ 2024-12-19 17:03 ` Neil Armstrong
0 siblings, 0 replies; 5+ messages in thread
From: Neil Armstrong @ 2024-12-19 17:03 UTC (permalink / raw)
To: Manivannan Sadhasivam, andersson, mturquette, sboyd
Cc: linux-arm-msm, linux-clk, linux-kernel, stable
On 19/12/2024 18:00, Manivannan Sadhasivam wrote:
> 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>
> ---
> drivers/clk/qcom/gcc-sm8650.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/clk/qcom/gcc-sm8650.c b/drivers/clk/qcom/gcc-sm8650.c
> index fd9d6544bdd5..9dd5c48f33be 100644
> --- a/drivers/clk/qcom/gcc-sm8650.c
> +++ b/drivers/clk/qcom/gcc-sm8650.c
> @@ -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,
> };
>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on QRD8650
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] clk: qcom: gcc-sm8550: Do not turn off PCIe GDSCs during gdsc_disable()
2024-12-19 17:00 [PATCH 1/2] clk: qcom: gcc-sm8550: Do not turn off PCIe GDSCs during gdsc_disable() Manivannan Sadhasivam
2024-12-19 17:00 ` [PATCH 2/2] clk: qcom: gcc-sm8650: " Manivannan Sadhasivam
@ 2024-12-19 17:02 ` Neil Armstrong
2024-12-26 18:26 ` (subset) " Bjorn Andersson
2 siblings, 0 replies; 5+ messages in thread
From: Neil Armstrong @ 2024-12-19 17:02 UTC (permalink / raw)
To: Manivannan Sadhasivam, andersson, mturquette, sboyd
Cc: linux-arm-msm, linux-clk, linux-kernel, stable
On 19/12/2024 18:00, Manivannan Sadhasivam wrote:
> 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>
> ---
> drivers/clk/qcom/gcc-sm8550.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/clk/qcom/gcc-sm8550.c b/drivers/clk/qcom/gcc-sm8550.c
> index 5abaeddd6afc..862a9bf73bcb 100644
> --- a/drivers/clk/qcom/gcc-sm8550.c
> +++ b/drivers/clk/qcom/gcc-sm8550.c
> @@ -3003,7 +3003,7 @@ static struct gdsc pcie_0_gdsc = {
> .pd = {
> .name = "pcie_0_gdsc",
> },
> - .pwrsts = PWRSTS_OFF_ON,
> + .pwrsts = PWRSTS_RET_ON,
> .flags = VOTABLE | POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
> };
>
> @@ -3014,7 +3014,7 @@ static struct gdsc pcie_0_phy_gdsc = {
> .pd = {
> .name = "pcie_0_phy_gdsc",
> },
> - .pwrsts = PWRSTS_OFF_ON,
> + .pwrsts = PWRSTS_RET_ON,
> .flags = VOTABLE | POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
> };
>
> @@ -3025,7 +3025,7 @@ static struct gdsc pcie_1_gdsc = {
> .pd = {
> .name = "pcie_1_gdsc",
> },
> - .pwrsts = PWRSTS_OFF_ON,
> + .pwrsts = PWRSTS_RET_ON,
> .flags = VOTABLE | POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
> };
>
> @@ -3036,7 +3036,7 @@ static struct gdsc pcie_1_phy_gdsc = {
> .pd = {
> .name = "pcie_1_phy_gdsc",
> },
> - .pwrsts = PWRSTS_OFF_ON,
> + .pwrsts = PWRSTS_RET_ON,
> .flags = VOTABLE | POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
> };
>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on QRD8550
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: (subset) [PATCH 1/2] clk: qcom: gcc-sm8550: Do not turn off PCIe GDSCs during gdsc_disable()
2024-12-19 17:00 [PATCH 1/2] clk: qcom: gcc-sm8550: Do not turn off PCIe GDSCs during gdsc_disable() Manivannan Sadhasivam
2024-12-19 17:00 ` [PATCH 2/2] clk: qcom: gcc-sm8650: " Manivannan Sadhasivam
2024-12-19 17:02 ` [PATCH 1/2] clk: qcom: gcc-sm8550: " Neil Armstrong
@ 2024-12-26 18:26 ` Bjorn Andersson
2 siblings, 0 replies; 5+ messages in thread
From: Bjorn Andersson @ 2024-12-26 18:26 UTC (permalink / raw)
To: mturquette, sboyd, Manivannan Sadhasivam
Cc: linux-arm-msm, linux-clk, linux-kernel, stable, Neil Armstrong
On Thu, 19 Dec 2024 22:30:10 +0530, Manivannan Sadhasivam wrote:
> 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.
>
> [...]
Applied, thanks!
[1/2] clk: qcom: gcc-sm8550: Do not turn off PCIe GDSCs during gdsc_disable()
commit: 967e011013eda287dbec9e8bd3a19ebe730b8a08
[2/2] clk: qcom: gcc-sm8650: Do not turn off PCIe GDSCs during gdsc_disable()
commit: a57465766a91c6e173876f9cbb424340e214313f
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-12-26 18:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-19 17:00 [PATCH 1/2] clk: qcom: gcc-sm8550: Do not turn off PCIe GDSCs during gdsc_disable() Manivannan Sadhasivam
2024-12-19 17:00 ` [PATCH 2/2] clk: qcom: gcc-sm8650: " Manivannan Sadhasivam
2024-12-19 17:03 ` Neil Armstrong
2024-12-19 17:02 ` [PATCH 1/2] clk: qcom: gcc-sm8550: " Neil Armstrong
2024-12-26 18:26 ` (subset) " Bjorn Andersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®