mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-11 16:29:05 +00:00
remoteproc: Refactor function rproc_trigger_auto_boot()
Refactor function rproc_trigger_auto_boot() to properly deal with scenarios where the remoteproc core needs to attach with a remote processor that has already been booted by an external entity. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Tested-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Link: https://lore.kernel.org/r/20200714195035.1426873-8-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
parent
0f9dc562b7
commit
e3d2193959
@ -1571,6 +1571,15 @@ static int rproc_trigger_auto_boot(struct rproc *rproc)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Since the remote processor is in a detached state, it has already
|
||||||
|
* been booted by another entity. As such there is no point in waiting
|
||||||
|
* for a firmware image to be loaded, we can simply initiate the process
|
||||||
|
* of attaching to it immediately.
|
||||||
|
*/
|
||||||
|
if (rproc->state == RPROC_DETACHED)
|
||||||
|
return rproc_boot(rproc);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We're initiating an asynchronous firmware loading, so we can
|
* We're initiating an asynchronous firmware loading, so we can
|
||||||
* be built-in kernel code, without hanging the boot process.
|
* be built-in kernel code, without hanging the boot process.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user