mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peng Fan <peng.fan@nxp.com>
To: Sudeep Holla <sudeep.holla@arm.com>,
	 Cristian Marussi <cristian.marussi@arm.com>
Cc: arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	 linux-kernel@vger.kernel.org,
	 Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>,
	 Chuck Cannon <chuck.cannon@nxp.com>, Peng Fan <peng.fan@nxp.com>
Subject: [PATCH v2 0/2] firmware: arm_scmi: add pm ops for scmi_power_control
Date: Fri, 04 Jul 2025 11:09:34 +0800	[thread overview]
Message-ID: <20250704-scmi-pm-v2-0-9316cec2f9cc@nxp.com> (raw)

Move information could be found in patch 2 commit log, hope it is clear

When testing on i.MX95, two consecutive suspend message send to the Linux
agent, Linux will suspend(by the 1st suspend message) and wake up(by the
2nd suspend message).

The ARM SCMI spec does not allow for filtering of which messages an agent
wants to get on the system power protocol. To i.MX95, as we use mailbox
to receive message, and the mailbox supports wake up(interrupt is always
enabled), so linux will also get a repeated suspend message. This will
cause Linux to wake (and should then go back into suspend).

This patchset is to make the 2nd suspend message could suspend linux
again.

So why SCMI firmware couldn't block the 2nd suspend message from being
sent to Linux agent? Per checking with our SCMI firmware owner:
The SM(System Manager) does not know exactly when Linux is in suspend.
There are no handshakes that clearly tell the SM this. The flow should
be, if in suspend and you send a suspend (or graceful reset/power off)
it will wake and then do the request action

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
Changes in v2:
- Simplify code follow Dan's comments for patch 1
- Rewrite commit log for patch 2 to make it clear
- Rebased to next-20250703
- Link to v1: https://lore.kernel.org/r/20250620-scmi-pm-v1-0-c2f02cae5122@nxp.com

---
Peng Fan (2):
      firmware: arm_scmi: bus: Add pm ops
      firmware: arm_scmi: power_control: Set SCMI_SYSPOWER_IDLE in PM resume

 drivers/firmware/arm_scmi/bus.c                | 33 ++++++++++++++++++++++++++
 drivers/firmware/arm_scmi/scmi_power_control.c | 24 +++++++++++++++----
 2 files changed, 52 insertions(+), 5 deletions(-)
---
base-commit: 38e1f239ba67d7a34d6b5e300fd61cb6fdffc831
change-id: 20250620-scmi-pm-8f6170769230

Best regards,
-- 
Peng Fan <peng.fan@nxp.com>


             reply	other threads:[~2025-07-04  3:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-04  3:09 Peng Fan [this message]
2025-07-04  3:09 ` [PATCH v2 1/2] firmware: arm_scmi: bus: Add pm ops Peng Fan
2025-07-07 11:25   ` Sudeep Holla
2025-07-08  1:32     ` Peng Fan
2025-07-04  3:09 ` [PATCH v2 2/2] firmware: arm_scmi: power_control: Set SCMI_SYSPOWER_IDLE in PM resume Peng Fan
2025-07-08 15:26 ` [PATCH v2 0/2] firmware: arm_scmi: add pm ops for scmi_power_control Sudeep Holla

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=20250704-scmi-pm-v2-0-9316cec2f9cc@nxp.com \
    --to=peng.fan@nxp.com \
    --cc=arm-scmi@vger.kernel.org \
    --cc=chuck.cannon@nxp.com \
    --cc=cristian.marussi@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ranjani.vaidyanathan@nxp.com \
    --cc=sudeep.holla@arm.com \
    /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®