2023-07-07 08:21:21

by Manivannan Sadhasivam

[permalink] [raw]
Subject: [PATCH v3] clk: qcom: gcc-sc8280xp: Allow PCIe GDSCs to enter retention state

With the minimal system suspend support in place for the PCIe driver that
keeps the interconnect path voted, the ALWAYS_ON flag can now be dropped.

Also, the pwrsts PWRSTS_RET_ON flag should be used to allow the GDSCs to
enter the retention state when the parent domain get's turned off during
system suspend.

Signed-off-by: Manivannan Sadhasivam <[email protected]>
---

This patch depends on: https://lore.kernel.org/linux-arm-msm/[email protected]/

Changes in v3:

* Fixed the erroneous PWRSTS_RET_ON assignment
* Rebased on top of Konrad's series

Changes in v2:

* Changed the patch from simple revert to changing the ALWAYS_ON flag to
PWRSTS_RET_ON.

drivers/clk/qcom/gcc-sc8280xp.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/clk/qcom/gcc-sc8280xp.c b/drivers/clk/qcom/gcc-sc8280xp.c
index 57bbd609151c..39c46b7ee09a 100644
--- a/drivers/clk/qcom/gcc-sc8280xp.c
+++ b/drivers/clk/qcom/gcc-sc8280xp.c
@@ -6785,8 +6785,8 @@ static struct gdsc pcie_2a_gdsc = {
.pd = {
.name = "pcie_2a_gdsc",
},
- .pwrsts = PWRSTS_OFF_ON,
- .flags = VOTABLE | RETAIN_FF_ENABLE | ALWAYS_ON,
+ .pwrsts = PWRSTS_RET_ON,
+ .flags = VOTABLE | RETAIN_FF_ENABLE,
};

static struct gdsc pcie_2b_gdsc = {
@@ -6796,8 +6796,8 @@ static struct gdsc pcie_2b_gdsc = {
.pd = {
.name = "pcie_2b_gdsc",
},
- .pwrsts = PWRSTS_OFF_ON,
- .flags = VOTABLE | RETAIN_FF_ENABLE | ALWAYS_ON,
+ .pwrsts = PWRSTS_RET_ON,
+ .flags = VOTABLE | RETAIN_FF_ENABLE,
};

static struct gdsc pcie_3a_gdsc = {
@@ -6807,8 +6807,8 @@ static struct gdsc pcie_3a_gdsc = {
.pd = {
.name = "pcie_3a_gdsc",
},
- .pwrsts = PWRSTS_OFF_ON,
- .flags = VOTABLE | RETAIN_FF_ENABLE | ALWAYS_ON,
+ .pwrsts = PWRSTS_RET_ON,
+ .flags = VOTABLE | RETAIN_FF_ENABLE,
};

static struct gdsc pcie_3b_gdsc = {
@@ -6818,8 +6818,8 @@ static struct gdsc pcie_3b_gdsc = {
.pd = {
.name = "pcie_3b_gdsc",
},
- .pwrsts = PWRSTS_OFF_ON,
- .flags = VOTABLE | RETAIN_FF_ENABLE | ALWAYS_ON,
+ .pwrsts = PWRSTS_RET_ON,
+ .flags = VOTABLE | RETAIN_FF_ENABLE,
};

static struct gdsc pcie_4_gdsc = {
@@ -6829,8 +6829,8 @@ static struct gdsc pcie_4_gdsc = {
.pd = {
.name = "pcie_4_gdsc",
},
- .pwrsts = PWRSTS_OFF_ON,
- .flags = VOTABLE | RETAIN_FF_ENABLE | ALWAYS_ON,
+ .pwrsts = PWRSTS_RET_ON,
+ .flags = VOTABLE | RETAIN_FF_ENABLE,
};

static struct gdsc ufs_card_gdsc = {
--
2.25.1



2023-07-10 05:33:10

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH v3] clk: qcom: gcc-sc8280xp: Allow PCIe GDSCs to enter retention state


On Fri, 07 Jul 2023 13:29:26 +0530, Manivannan Sadhasivam wrote:
> With the minimal system suspend support in place for the PCIe driver that
> keeps the interconnect path voted, the ALWAYS_ON flag can now be dropped.
>
> Also, the pwrsts PWRSTS_RET_ON flag should be used to allow the GDSCs to
> enter the retention state when the parent domain get's turned off during
> system suspend.
>
> [...]

Applied, thanks!

[1/1] clk: qcom: gcc-sc8280xp: Allow PCIe GDSCs to enter retention state
commit: db382dd55bcb8bc6319a14ad50689c19dba83b7b

Best regards,
--
Bjorn Andersson <[email protected]>