aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuman Anna2014-04-22 11:32:06 -0500
committerSuman Anna2019-03-11 12:00:03 -0500
commit7f275d21e2401b65379fd6fa9744cbea7f92fe2f (patch)
tree887ee8688edcccba195c48a2c4e0f913249ca90e
parent10f1ce98200ec692c9c6381814a551abe20e27e2 (diff)
downloadremoteproc-7f275d21e2401b65379fd6fa9744cbea7f92fe2f.tar.gz
remoteproc-7f275d21e2401b65379fd6fa9744cbea7f92fe2f.tar.xz
remoteproc-7f275d21e2401b65379fd6fa9744cbea7f92fe2f.zip
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. Signed-off-by: Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com> Signed-off-by: Suman Anna <s-anna@ti.com>
-rw-r--r--drivers/remoteproc/omap_remoteproc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c
index 2016de9e650d..db39527bde0b 100644
--- a/drivers/remoteproc/omap_remoteproc.c
+++ b/drivers/remoteproc/omap_remoteproc.c
@@ -356,8 +356,12 @@ static void omap_rproc_mbox_callback(struct mbox_client *client, void *data)
356 356
357 switch (msg) { 357 switch (msg) {
358 case RP_MBOX_CRASH: 358 case RP_MBOX_CRASH:
359 /* just log this for now. later, we'll also do recovery */ 359 /*
360 * remoteproc detected an exception, notify the rproc core.
361 * The remoteproc core will handle the recovery.
362 */
360 dev_err(dev, "omap rproc %s crashed\n", name); 363 dev_err(dev, "omap rproc %s crashed\n", name);
364 rproc_report_crash(oproc->rproc, RPROC_FATAL_ERROR);
361 break; 365 break;
362 case RP_MBOX_ECHO_REPLY: 366 case RP_MBOX_ECHO_REPLY:
363 dev_info(dev, "received echo reply from %s\n", name); 367 dev_info(dev, "received echo reply from %s\n", name);