From: Hiago De Franco Date: Wed, 6 Aug 2025 17:48:17 +0000 (-0300) Subject: remoteproc: k3: Remove remote processor mailbox ping X-Git-Tag: v6.18-rc1~80^2~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9a4c582e508c210d1e8e70493a69c6e5708476c;p=thirdparty%2Fkernel%2Flinux.git remoteproc: k3: Remove remote processor mailbox ping As of today, pinging the remote processor during k3_rproc_request_mbox() does not have any functional effect. This behavior was originally based on the OMAP remoteproc driver, where the idea was to send messages such as suspend requests (among others) to the remote processor, but this was never upstreamed. Currently, the ping message has no effect in upstream usage and causes an unread message to remain in the mailbox, which ultimately prevents the system from entering suspend mode: Freezing remaining freezable tasks completed (elapsed 0.001 seconds) printk: Suspending console(s) (use no_console_suspend to debug) omap-mailbox 29000000.mailbox: fifo 1 has unexpected unread messages omap-mailbox 29000000.mailbox: PM: dpm_run_callback(): platform_pm_suspend returns -16 omap-mailbox 29000000.mailbox: PM: failed to suspend: error -16 The ping is only replied if the remote core firmware is capable of doing it, otherwise the unread message stays into the mailbox. Remove the ping and fix the suspend issue. Suggested-by: Andrew Davis Signed-off-by: Hiago De Franco Acked-by: Andrew Davis Link: https://lore.kernel.org/r/20250806-v1-fix-am62-hmp-suspend-v1-1-1c4a81bb5dde@toradex.com Signed-off-by: Mathieu Poirier --- diff --git a/drivers/remoteproc/ti_k3_common.c b/drivers/remoteproc/ti_k3_common.c index d4f20900f33bd..8266e11914af8 100644 --- a/drivers/remoteproc/ti_k3_common.c +++ b/drivers/remoteproc/ti_k3_common.c @@ -160,7 +160,6 @@ int k3_rproc_request_mbox(struct rproc *rproc) struct k3_rproc *kproc = rproc->priv; struct mbox_client *client = &kproc->client; struct device *dev = kproc->dev; - int ret; client->dev = dev; client->tx_done = NULL; @@ -173,20 +172,6 @@ int k3_rproc_request_mbox(struct rproc *rproc) return dev_err_probe(dev, PTR_ERR(kproc->mbox), "mbox_request_channel failed\n"); - /* - * Ping the remote processor, this is only for sanity-sake for now; - * there is no functional effect whatsoever. - * - * Note that the reply will _not_ arrive immediately: this message - * will wait in the mailbox fifo until the remote processor is booted. - */ - ret = mbox_send_message(kproc->mbox, (void *)RP_MBOX_ECHO_REQUEST); - if (ret < 0) { - dev_err(dev, "mbox_send_message failed (%pe)\n", ERR_PTR(ret)); - mbox_free_channel(kproc->mbox); - return ret; - } - return 0; } EXPORT_SYMBOL_GPL(k3_rproc_request_mbox);