[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1490383355-23176-3-git-send-email-jliang@xilinx.com>
Date: Fri, 24 Mar 2017 12:22:18 -0700
From: Wendy Liang <wendy.liang@...inx.com>
To: <bjorn.andersson@...aro.org>
CC: <linux-remoteproc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
"Wendy Liang" <wendy.liang@...inx.com>,
Wendy Liang <jliang@...inx.com>,
Michal Simek <michal.simek@...inx.com>
Subject: [RFC LINUX PATCH 02/19] remtoeproc: Add an operation to check if remote is running
From: Wendy Liang <wendy.liang@...inx.com>
Add a remoteproc driver operation to check if the remote is running.
Signed-off-by: Wendy Liang <jliang@...inx.com>
Signed-off-by: Michal Simek <michal.simek@...inx.com>
---
drivers/remoteproc/remoteproc_core.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index 9d32737..dfa2aad 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -888,6 +888,16 @@ static void rproc_resource_cleanup(struct rproc *rproc)
}
/*
+ * check if the remote is running
+ */
+static bool rproc_is_running(struct rproc *rproc)
+{
+ if (rproc->ops->is_running)
+ return rproc->ops->is_running(rproc);
+ return (rproc->state == RPROC_RUNNING) ? true : false;
+}
+
+/*
* take a firmware and boot a remote processor with it.
*/
static int rproc_fw_boot(struct rproc *rproc, const struct firmware *fw)
--
1.9.1
Powered by blists - more mailing lists