diff options
author | Peter Griffin <peter.griffin@linaro.org> | 2016-05-25 09:57:07 +0100 |
---|---|---|
committer | Peter Griffin <peter.griffin@linaro.org> | 2016-05-25 09:57:07 +0100 |
commit | 6e75cb0f2d1ff77611bb0ee3164797217942d75b (patch) | |
tree | 7ec56698c220cff8a94201ec38ddec7ec17393f9 | |
parent | 632918ce9a29226f3728ee8927743862632f8ae6 (diff) |
remoteproc: make rproc_boot wait for firmware_loading_completev4.6-rc3-fdma-v4-with-asoc
rproc_alloc() kicks off an asynchronous requerst_firmware_notwait.
Most rproc drivers then call rproc_boot(), although there is no
guarentee that rproc_fw_config_virtio() callback will have finished
executing by this point.
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
-rw-r--r-- | drivers/remoteproc/remoteproc_core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 3d7d58a109d8..97b6aa325fcf 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -1053,6 +1053,9 @@ int rproc_boot(struct rproc *rproc) dev = &rproc->dev; + /* if rproc is just being registered, wait */ + wait_for_completion(&rproc->firmware_loading_complete); + ret = mutex_lock_interruptible(&rproc->lock); if (ret) { dev_err(dev, "can't lock rproc %s: %d\n", rproc->name, ret); |