Skip to content

Commit

Permalink
remoteproc: Add new RPROC_ATTACHED state
Browse files Browse the repository at this point in the history
Add a new RPROC_ATTACHED state to take into account scenarios
where the remoteproc core needs to attach to a remote processor
that is booted by another entity.

Signed-off-by: Mathieu Poirier <[email protected]>
Reviewed-by: Peng Fan <[email protected]>
Reviewed-by: Arnaud Pouliquen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bjorn Andersson <[email protected]>
  • Loading branch information
mathieupoirier authored and andersson committed Mar 18, 2021
1 parent 6a6c4dc commit 4196d18
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions drivers/remoteproc/remoteproc_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ static const char * const rproc_state_string[] = {
[RPROC_RUNNING] = "running",
[RPROC_CRASHED] = "crashed",
[RPROC_DELETED] = "deleted",
[RPROC_ATTACHED] = "attached",
[RPROC_DETACHED] = "detached",
[RPROC_LAST] = "invalid",
};
Expand Down
7 changes: 5 additions & 2 deletions include/linux/remoteproc.h
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,8 @@ struct rproc_ops {
* @RPROC_RUNNING: device is up and running
* @RPROC_CRASHED: device has crashed; need to start recovery
* @RPROC_DELETED: device is deleted
* @RPROC_ATTACHED: device has been booted by another entity and the core
* has attached to it
* @RPROC_DETACHED: device has been booted by another entity and waiting
* for the core to attach to it
* @RPROC_LAST: just keep this one at the end
Expand All @@ -423,8 +425,9 @@ enum rproc_state {
RPROC_RUNNING = 2,
RPROC_CRASHED = 3,
RPROC_DELETED = 4,
RPROC_DETACHED = 5,
RPROC_LAST = 6,
RPROC_ATTACHED = 5,
RPROC_DETACHED = 6,
RPROC_LAST = 7,
};

/**
Expand Down

0 comments on commit 4196d18

Please sign in to comment.