aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/remoteproc
diff options
context:
space:
mode:
authorLuden <luden@ghostmail.com>2016-02-19 22:30:24 +0100
committerZiyan <jaraidaniel@gmail.com>2016-04-03 14:56:08 +0200
commitc8aab7d2d66ddb575dba471d23016a419bf1cb17 (patch)
tree76923cc2ae5e0aeb08cddf90347498f1f9403c9e /drivers/remoteproc
parent023e74505ae1d02e5af7b7d64f229cf76940c873 (diff)
downloadkernel_samsung_tuna-c8aab7d2d66ddb575dba471d23016a419bf1cb17.tar.gz
kernel_samsung_tuna-c8aab7d2d66ddb575dba471d23016a419bf1cb17.tar.bz2
kernel_samsung_tuna-c8aab7d2d66ddb575dba471d23016a419bf1cb17.zip
Allow RPROC to be turned off from SUSPEND mode.
If device is suspended before RPROC auto-suspend kicks in, RPROC will be in the to SUSPENDED state when rproc_put() is called - but we still need to stop it properly. This fixes several types of crashes + failures to acquire timers on RPROC restat.
Diffstat (limited to 'drivers/remoteproc')
-rwxr-xr-xdrivers/remoteproc/remoteproc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/remoteproc/remoteproc.c b/drivers/remoteproc/remoteproc.c
index 39489af4ba3..65d2c79ce06 100755
--- a/drivers/remoteproc/remoteproc.c
+++ b/drivers/remoteproc/remoteproc.c
@@ -1378,7 +1378,7 @@ void rproc_put(struct rproc *rproc)
* make sure rproc is really running before powering it off.
* this is important, because the fw loading might have failed.
*/
- if (rproc->state == RPROC_RUNNING || rproc->state == RPROC_CRASHED) {
+ if (rproc->state != RPROC_OFFLINE && rproc->state != RPROC_LOADING) {
#ifdef CONFIG_REMOTE_PROC_AUTOSUSPEND
/*
* Call resume, it will cancel any pending autosuspend,