[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1637040382-22987-2-git-send-email-rnayak@codeaurora.org>
Date: Tue, 16 Nov 2021 10:56:22 +0530
From: Rajendra Nayak <rnayak@...eaurora.org>
To: agross@...nel.org, bjorn.andersson@...aro.org
Cc: linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
swboyd@...omium.org, Rajendra Nayak <rnayak@...eaurora.org>
Subject: [PATCH 2/2] soc: qcom: rpmhpd: Make mx as a parent of cx only for sdm845
The requirement to specify the active + sleep and active-only MX power
domains as the parents of the corresponding CX power domains is applicable
only on the sdm845 SoC. With the same struct definition reused for all the
SoCs this condition was wrongly applied to all those SoCs as well, which
isn't needed. Define new sdm845 specific structures to manage this
dependency and remove the parent assignements from the common structure.
Signed-off-by: Rajendra Nayak <rnayak@...eaurora.org>
---
drivers/soc/qcom/rpmhpd.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/drivers/soc/qcom/rpmhpd.c b/drivers/soc/qcom/rpmhpd.c
index c71481d..12d8ce9 100644
--- a/drivers/soc/qcom/rpmhpd.c
+++ b/drivers/soc/qcom/rpmhpd.c
@@ -108,7 +108,6 @@ static struct rpmhpd cx_ao;
static struct rpmhpd cx = {
.pd = { .name = "cx", },
.peer = &cx_ao,
- .parent = &mx.pd,
.res_name = "cx.lvl",
};
@@ -116,7 +115,6 @@ static struct rpmhpd cx_ao = {
.pd = { .name = "cx_ao", },
.active_only = true,
.peer = &cx,
- .parent = &mx_ao.pd,
.res_name = "cx.lvl",
};
@@ -149,12 +147,28 @@ static struct rpmhpd mxc_ao = {
};
/* SDM845 RPMH powerdomains */
+static struct rpmhpd sdm845_cx_ao;
+static struct rpmhpd sdm845_cx = {
+ .pd = { .name = "cx", },
+ .peer = &sdm845_cx_ao,
+ .parent = &mx.pd,
+ .res_name = "cx.lvl",
+};
+
+static struct rpmhpd sdm845_cx_ao = {
+ .pd = { .name = "cx_ao", },
+ .active_only = true,
+ .peer = &sdm845_cx,
+ .parent = &mx_ao.pd,
+ .res_name = "cx.lvl",
+};
+
static struct rpmhpd *sdm845_rpmhpds[] = {
[SDM845_EBI] = &ebi,
[SDM845_MX] = &mx,
[SDM845_MX_AO] = &mx_ao,
- [SDM845_CX] = &cx,
- [SDM845_CX_AO] = &cx_ao,
+ [SDM845_CX] = &sdm845_cx,
+ [SDM845_CX_AO] = &sdm845_cx_ao,
[SDM845_LMX] = &lmx,
[SDM845_LCX] = &lcx,
[SDM845_GFX] = &gfx,
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
Powered by blists - more mailing lists