diff options
author | Miguel Vadillo <vadillo@ti.com> | 2011-10-17 19:19:17 -0500 |
---|---|---|
committer | Ziyann <jaraidaniel@gmail.com> | 2014-10-01 12:58:13 +0200 |
commit | 09fba50a9c76d721d3b275194e67e7ffacf6e54d (patch) | |
tree | cb17bd446d84b65f043729e37c05f31966589fc0 /drivers/remoteproc | |
parent | 5d5e7dfeb2063c0a1765e4d9995385e511d84e9e (diff) | |
download | kernel_samsung_tuna-09fba50a9c76d721d3b275194e67e7ffacf6e54d.tar.gz kernel_samsung_tuna-09fba50a9c76d721d3b275194e67e7ffacf6e54d.tar.bz2 kernel_samsung_tuna-09fba50a9c76d721d3b275194e67e7ffacf6e54d.zip |
omap: remoteproc: add a notification for loading error
When calling rproc_get for the first time, the loading of
the remoteproc image will be requested using a non-blocking
request_firmware_no_wait, and the caller can continue before
the actual loading is complete.
The loader later can return an error due to a non-existing
or wrong image and there should be a way to notify about this
to users having a rproc handle.
This functionality is added and is leveraged by rpmsg to
release some resources it had already acquired since requesting
a firmware load.
Change-Id: I1d3523efbcfd613bca74d363084791ceaaaa9989
Signed-off-by: Miguel Vadillo <vadillo@ti.com>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r-- | drivers/remoteproc/remoteproc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/remoteproc/remoteproc.c b/drivers/remoteproc/remoteproc.c index de48cb9a60c..fa59adc52d1 100644 --- a/drivers/remoteproc/remoteproc.c +++ b/drivers/remoteproc/remoteproc.c @@ -1134,7 +1134,7 @@ static void rproc_loader_cont(const struct firmware *fw, void *context) u64 bootaddr = 0; struct fw_header *image; struct fw_section *section; - int left, ret; + int left, ret = -EINVAL; if (!fw) { dev_err(dev, "%s: failed to load %s\n", __func__, fwfile); @@ -1191,6 +1191,8 @@ out: complete_fw: /* allow all contexts calling rproc_put() to proceed */ complete_all(&rproc->firmware_loading_complete); + if (ret) + _event_notify(rproc, RPROC_LOAD_ERROR, NULL); } static int rproc_loader(struct rproc *rproc) |