Commit 232ba6ca authored by Suman Anna's avatar Suman Anna Committed by Bjorn Andersson

remoteproc/omap: Report device exceptions and trigger recovery

The OMAP remote processors send a special mailbox message
(RP_MBOX_CRASH) when they crash and detect an internal device
exception.

Add support to the mailbox handling function upon detection of
this special message to report this crash to the remoteproc core.
The remoteproc core can trigger a recovery using the prevailing
recovery mechanism, already in use for MMU Fault recovery.
Co-developed-by: default avatarSubramaniam Chanderashekarapuram <subramaniam.ca@ti.com>
Signed-off-by: default avatarSubramaniam Chanderashekarapuram <subramaniam.ca@ti.com>
Signed-off-by: default avatarSuman Anna <s-anna@ti.com>
Signed-off-by: default avatarTero Kristo <t-kristo@ti.com>
Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: default avatarAndrew F. Davis <afd@ti.com>
Acked-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20200324110035.29907-14-t-kristo@ti.comSigned-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent 5f31b232
...@@ -383,8 +383,12 @@ static void omap_rproc_mbox_callback(struct mbox_client *client, void *data) ...@@ -383,8 +383,12 @@ static void omap_rproc_mbox_callback(struct mbox_client *client, void *data)
switch (msg) { switch (msg) {
case RP_MBOX_CRASH: case RP_MBOX_CRASH:
/* just log this for now. later, we'll also do recovery */ /*
* remoteproc detected an exception, notify the rproc core.
* The remoteproc core will handle the recovery.
*/
dev_err(dev, "omap rproc %s crashed\n", name); dev_err(dev, "omap rproc %s crashed\n", name);
rproc_report_crash(oproc->rproc, RPROC_FATAL_ERROR);
break; break;
case RP_MBOX_ECHO_REPLY: case RP_MBOX_ECHO_REPLY:
dev_info(dev, "received echo reply from %s\n", name); dev_info(dev, "received echo reply from %s\n", name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment