summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 81d5a33)
raw | patch | inline | side by side (parent: 81d5a33)
author | Suman Anna <s-anna@ti.com> | |
Thu, 11 May 2017 05:55:59 +0000 (05:55 +0000) | ||
committer | Suman Anna <s-anna@ti.com> | |
Mon, 11 Mar 2019 17:02:01 +0000 (12:02 -0500) |
The runtime autosuspend on a OMAP remoteproc device is attempted when
the suspend timer expires (autosuspend delay elapsed since the last
time the device is busy). This is the normal autosuspend scenario
for a device functioning normally. This timer can also expire during
the debugging of a remoteproc crash when the remoteproc recovery is
disabled. This is an invalid pre-condition though, so check for the
RPROC_CRASHED state and bail out before the actual check for the
RPROC_RUNNING state. The auto-suspend is also not re-attempted until
the remoteproc is recovered and restored to normal functional state.
Signed-off-by: Suman Anna <s-anna@ti.com>
the suspend timer expires (autosuspend delay elapsed since the last
time the device is busy). This is the normal autosuspend scenario
for a device functioning normally. This timer can also expire during
the debugging of a remoteproc crash when the remoteproc recovery is
disabled. This is an invalid pre-condition though, so check for the
RPROC_CRASHED state and bail out before the actual check for the
RPROC_RUNNING state. The auto-suspend is also not re-attempted until
the remoteproc is recovered and restored to normal functional state.
Signed-off-by: Suman Anna <s-anna@ti.com>
drivers/remoteproc/omap_remoteproc.c | patch | blob | history |
index db39527bde0b5d6494b79d13390ef659a21a9c1f..5142d01f1cd66f9a27ea6d5f6e681d9e20d821ce 100644 (file)
struct omap_rproc *oproc = rproc->priv;
int ret;
+ if (rproc->state == RPROC_CRASHED) {
+ dev_dbg(dev, "rproc cannot be runtime suspended when crashed!\n");
+ return -EBUSY;
+ }
+
if (WARN_ON(rproc->state != RPROC_RUNNING)) {
dev_err(dev, "rproc cannot be runtime suspended when not running!\n");
return -EBUSY;