aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/remoteproc
diff options
context:
space:
mode:
authorSubramaniam C.A <subramaniam.ca@ti.com>2012-03-27 11:12:38 -0500
committerZiyann <jaraidaniel@gmail.com>2014-10-01 12:58:03 +0200
commit9b3f3d6ea1030553e0c80323e6cfff3adc5ebf01 (patch)
treeefd4157128ff27cfcfacccfb877a26b97b62baa7 /drivers/remoteproc
parent268ebf01d357d4b99de2f8e2476004eb5ec24ebb (diff)
downloadkernel_samsung_tuna-9b3f3d6ea1030553e0c80323e6cfff3adc5ebf01.tar.gz
kernel_samsung_tuna-9b3f3d6ea1030553e0c80323e6cfff3adc5ebf01.tar.bz2
kernel_samsung_tuna-9b3f3d6ea1030553e0c80323e6cfff3adc5ebf01.zip
omap: remoteproc: return -EAGAIN on a suspend time out
Support has been added on the remote processor side to allow applications to deny the remote processor from going into a suspend state. If one or more applications on the remote processor request to avoid suspend, then the suspend flag is never set by the remote processor while the request is active, resulting in a timeout on the host side suspend code. The runtime suspend function for remoteproc returns -EIO at present in case of a timeout, causing the runtime pm framework to avoid further runtime pm suspend callbacks. This is not desired and hence the return value is changed to -EAGAIN. This allows the runtime pm framework to retry the suspend after the re-expiration of the timeout. This would allow the applications on the remote processor to allow or disallow suspend independently of the host-side. The inital idea of having -EIO was to avoid callbacks, since a timeout would mean that the remoteproc is in an error state. However, if the remoteproc were in a bad state at this point, the recovery mechanism would kick in and reload the image. Change-Id: Ic7b9cfa220724e8024b960704598ec93854de86c Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com> Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Miguel Vadillo <vadillo@ti.com> Signed-off-by: Paul Hunt <hunt@ti.com>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r--drivers/remoteproc/omap_remoteproc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c
index 3cf21e9844c..ddb383fd216 100644
--- a/drivers/remoteproc/omap_remoteproc.c
+++ b/drivers/remoteproc/omap_remoteproc.c
@@ -70,7 +70,7 @@ static int _suspend(struct omap_rproc_priv *rpp)
schedule();
}
- return -EIO;
+ return -EAGAIN;
}
static int omap_suspend(struct rproc *rproc, bool force)