Skip to content

Commit d62e0e9

Browse files
iuliana-prodanmathieupoirier
authored andcommitted
remoteproc: imx_dsp_rproc: Skip RP_MBOX_SUSPEND_SYSTEM when mailbox TX channel is uninitialized
Firmwares that do not use mailbox communication (e.g., the hello_world sample) leave priv->tx_ch as NULL. The current suspend logic unconditionally sends RP_MBOX_SUSPEND_SYSTEM, which is invalid without an initialized TX channel. Detect the no_mailboxes case early and skip sending the suspend message. Instead, proceed directly to the runtime PM suspend path, which is the correct behavior for firmwares that cannot respond to mailbox requests. Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com> Link: https://lore.kernel.org/r/20251204122825.756106-1-iuliana.prodan@oss.nxp.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
1 parent 70eaa8e commit d62e0e9

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

drivers/remoteproc/imx_dsp_rproc.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,6 +1242,15 @@ static int imx_dsp_suspend(struct device *dev)
12421242
if (rproc->state != RPROC_RUNNING)
12431243
goto out;
12441244

1245+
/*
1246+
* No channel available for sending messages;
1247+
* indicates no mailboxes present, so trigger PM runtime suspend
1248+
*/
1249+
if (!priv->tx_ch) {
1250+
dev_dbg(dev, "No initialized mbox tx channel, suspend directly.\n");
1251+
goto out;
1252+
}
1253+
12451254
reinit_completion(&priv->pm_comp);
12461255

12471256
/* Tell DSP that suspend is happening */

0 commit comments

Comments
 (0)