From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
To: sudeep.holla@arm.com, cristian.marussi@arm.com, ulf.hansson@linaro.org
Cc: arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
ranjani.vaidyanathan@nxp.com, Peng Fan <peng.fan@nxp.com>
Subject: [PATCH] pmdomain: arm: scmi_pm_domain: Initialize state as off
Date: Fri, 10 Jan 2025 14:13:46 +0800 [thread overview]
Message-ID: <20250110061346.2440772-1-peng.fan@oss.nxp.com> (raw)
From: Peng Fan <peng.fan@nxp.com>
Per ARM SCMI Spec DEN0056E, page 16, "The platform may disable a resource
if no agent has requested to use that resource."
Linux Kernel should not rely on a state that it has not requested, so
make state as off during initialization.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/pmdomain/arm/scmi_pm_domain.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/pmdomain/arm/scmi_pm_domain.c b/drivers/pmdomain/arm/scmi_pm_domain.c
index a7784a8bb5db..eadfc032867f 100644
--- a/drivers/pmdomain/arm/scmi_pm_domain.c
+++ b/drivers/pmdomain/arm/scmi_pm_domain.c
@@ -89,13 +89,6 @@ static int scmi_pm_domain_probe(struct scmi_device *sdev)
return -ENOMEM;
for (i = 0; i < num_domains; i++, scmi_pd++) {
- u32 state;
-
- if (power_ops->state_get(ph, i, &state)) {
- dev_warn(dev, "failed to get state for domain %d\n", i);
- continue;
- }
-
scmi_pd->domain = i;
scmi_pd->ph = ph;
scmi_pd->name = power_ops->name_get(ph, i);
@@ -104,8 +97,7 @@ static int scmi_pm_domain_probe(struct scmi_device *sdev)
scmi_pd->genpd.power_on = scmi_pd_power_on;
scmi_pd->genpd.flags = GENPD_FLAG_ACTIVE_WAKEUP;
- pm_genpd_init(&scmi_pd->genpd, NULL,
- state == SCMI_POWER_STATE_GENERIC_OFF);
+ pm_genpd_init(&scmi_pd->genpd, NULL, true);
domains[i] = &scmi_pd->genpd;
}
--
2.37.1
next reply other threads:[~2025-01-10 6:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-10 6:13 Peng Fan (OSS) [this message]
2025-01-13 10:31 ` Sudeep Holla
2025-01-13 11:37 ` Peng Fan
2025-01-13 13:49 ` Sudeep Holla
2025-01-13 15:30 ` [EXT] " Ranjani Vaidyanathan
2025-01-13 17:20 ` Sudeep Holla
2025-01-13 17:54 ` Cristian Marussi
2025-01-13 19:40 ` Ranjani Vaidyanathan
2025-01-13 19:54 ` Ranjani Vaidyanathan
2025-01-14 15:24 ` Sudeep Holla
2025-01-14 16:09 ` Ranjani Vaidyanathan
2025-01-14 18:16 ` Sudeep Holla
2025-01-15 9:15 ` Cristian Marussi
2025-01-15 18:42 ` Ranjani Vaidyanathan
2025-01-16 16:18 ` Cristian Marussi
2025-01-17 1:22 ` Peng Fan
2025-01-17 5:13 ` Dan Carpenter
2025-01-13 19:33 ` Cristian Marussi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250110061346.2440772-1-peng.fan@oss.nxp.com \
--to=peng.fan@oss.nxp.com \
--cc=arm-scmi@vger.kernel.org \
--cc=cristian.marussi@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=peng.fan@nxp.com \
--cc=ranjani.vaidyanathan@nxp.com \
--cc=sudeep.holla@arm.com \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®