]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
remoteproc: Add RPROC_DELETED state
authorSarangdhar Joshi <spjoshi@codeaurora.org>
Tue, 24 Jan 2017 01:53:18 +0000 (17:53 -0800)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Mon, 30 Jan 2017 22:18:52 +0000 (14:18 -0800)
Add new state RPROC_DELETED to handle synchronization
between rproc_del() and other operations on rproc. This
state represents the rproc device that has been "deleted".

CC: Loic Pallardy <loic.pallardy@st.com>
CC: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Sarangdhar Joshi <spjoshi@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/remoteproc/remoteproc_sysfs.c
include/linux/remoteproc.h

index bc5b0e00efb15422bcbf57a32798a4ea28a42646..47be411400e56aed1b48f44d4254e0178a640412 100644 (file)
@@ -73,6 +73,7 @@ static const char * const rproc_state_string[] = {
        [RPROC_SUSPENDED]       = "suspended",
        [RPROC_RUNNING]         = "running",
        [RPROC_CRASHED]         = "crashed",
+       [RPROC_DELETED]         = "deleted",
        [RPROC_LAST]            = "invalid",
 };
 
index 8265d351c9f0e6bc7814fd59ca1efff531e4798f..e691f64fc7bea06c761aeb7f064860de8b369cae 100644 (file)
@@ -346,6 +346,7 @@ struct rproc_ops {
  *                     a message.
  * @RPROC_RUNNING:     device is up and running
  * @RPROC_CRASHED:     device has crashed; need to start recovery
+ * @RPROC_DELETED:     device is deleted
  * @RPROC_LAST:                just keep this one at the end
  *
  * Please note that the values of these states are used as indices
@@ -359,7 +360,8 @@ enum rproc_state {
        RPROC_SUSPENDED = 1,
        RPROC_RUNNING   = 2,
        RPROC_CRASHED   = 3,
-       RPROC_LAST      = 4,
+       RPROC_DELETED   = 4,
+       RPROC_LAST      = 5,
 };
 
 /**