From: Jiafei Pan <Jiafei.Pan@nxp.com>
To: andersson@kernel.org, mathieu.poirier@linaro.org
Cc: krzysztof.kozlowski@linaro.org, peng.fan@nxp.com,
Frank.Li@nxp.com, s.hauer@pengutronix.de, kernel@pengutronix.de,
festevam@gmail.com, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, Zhiqiang.Hou@nxp.com,
mingkai.hu@nxp.com, Jiafei Pan <Jiafei.Pan@nxp.com>
Subject: [PATCH v4 3/4] remoteproc: imx_rproc: add autoboot support for A-core
Date: Wed, 12 Aug 2026 18:46:32 +0800 [thread overview]
Message-ID: <20260812104633.22420-4-Jiafei.Pan@nxp.com> (raw)
In-Reply-To: <20260812104633.22420-1-Jiafei.Pan@nxp.com>
From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Add autoboot support for Cortex-A Core remoteproc.
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
---
drivers/remoteproc/imx_rproc.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
index 8a3de27c96b7..e8d239bef5c9 100644
--- a/drivers/remoteproc/imx_rproc.c
+++ b/drivers/remoteproc/imx_rproc.c
@@ -1286,7 +1286,24 @@ static int imx_rproc_sm_detect_mode(struct rproc *rproc)
static int imx_rproc_psci_detect_mode(struct rproc *rproc)
{
- rproc->state = RPROC_OFFLINE;
+ struct imx_rproc *priv = rproc->priv;
+ unsigned int cpu;
+ int cpu_aff;
+
+ rproc->state = RPROC_DETACHED;
+ for_each_cpu(cpu, &priv->cpus) {
+ cpu_aff = psci_ops.affinity_info(cpu_logical_map(cpu), 0);
+ if (cpu_aff == PSCI_0_2_AFFINITY_LEVEL_OFF) {
+ rproc->state = RPROC_OFFLINE;
+ break;
+ }
+
+ /* in psci on state but running Linux */
+ if (cpu_online(cpu)) {
+ rproc->state = RPROC_OFFLINE;
+ break;
+ }
+ }
return 0;
}
@@ -1391,7 +1408,6 @@ static int imx_rproc_probe(struct platform_device *pdev)
bitmap_copy(cpumask_bits(&priv->cpus), &cpus_bits,
min((unsigned int)nr_cpumask_bits,
(unsigned int)sizeof(unsigned long)));
- rproc->auto_boot = false;
}
ret = imx_rproc_detect_mode(priv);
--
2.43.0
next prev parent reply other threads:[~2026-08-12 10:47 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-11 2:39 [PATCH v3 0/4] remoteproc: add Cortex-A Core remoteproc support on i.MX platforms Jiafei Pan
2026-05-11 2:39 ` [PATCH v3 1/4] dt-bindings: remoteproc: add imx-rproc-psci Jiafei Pan
2026-05-11 22:41 ` sashiko-bot
2026-05-14 11:38 ` Krzysztof Kozlowski
2026-08-12 9:19 ` Jiafei Pan
2026-08-12 10:02 ` Krzysztof Kozlowski
2026-08-12 10:46 ` [PATCH v4 0/4] remoteproc: add Cortex-A Core remoteproc support on i.MX platforms Jiafei Pan
2026-08-12 10:46 ` [PATCH v4 1/4] dt-bindings: remoteproc: add imx-rproc-psci Jiafei Pan
2026-08-13 7:49 ` Krzysztof Kozlowski
2026-08-13 7:51 ` Krzysztof Kozlowski
2026-08-14 7:37 ` [EXT] " Jiafei Pan
2026-08-17 16:39 ` Mathieu Poirier
2026-08-12 10:46 ` [PATCH v4 2/4] remoteproc: imx_rproc: add support for Cortex-A Core Jiafei Pan
2026-08-12 10:46 ` Jiafei Pan [this message]
2026-08-12 10:46 ` [PATCH v4 4/4] arm64: dts: imx93: Cortex-A Core remoteproc device node Jiafei Pan
2026-05-11 2:39 ` [PATCH v3 2/4] remoteproc: imx_rproc: add support for Cortex-A Core Jiafei Pan
2026-05-11 23:10 ` sashiko-bot
2026-05-11 2:39 ` [PATCH v3 3/4] remoteproc: imx_rproc: add autoboot support for A-core Jiafei Pan
2026-05-12 0:00 ` sashiko-bot
2026-05-11 2:39 ` [PATCH v3 4/4] arm64: dts: imx93: Cortex-A Core remoteproc device node Jiafei Pan
2026-05-12 0:37 ` sashiko-bot
2026-05-11 7:00 ` [PATCH v3 0/4] remoteproc: add Cortex-A Core remoteproc support on i.MX platforms Peng Fan
2026-05-11 17:10 ` Mathieu Poirier
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=20260812104633.22420-4-Jiafei.Pan@nxp.com \
--to=jiafei.pan@nxp.com \
--cc=Frank.Li@nxp.com \
--cc=Zhiqiang.Hou@nxp.com \
--cc=andersson@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=mingkai.hu@nxp.com \
--cc=peng.fan@nxp.com \
--cc=s.hauer@pengutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.