summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 658fb0b)
raw | patch | inline | side by side (parent: 658fb0b)
author | Wendy Liang <jliang@xilinx.com> | |
Thu, 4 Aug 2016 05:19:10 +0000 (22:19 -0700) | ||
committer | Wendy Liang <jliang@xilinx.com> | |
Thu, 13 Oct 2016 05:01:46 +0000 (22:01 -0700) |
Add hil_proc poll() for user to poll if the remoteproc has been
signaled.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
signaled.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
lib/common/hil.c | patch | blob | history | |
lib/include/openamp/hil.h | patch | blob | history |
diff --git a/lib/common/hil.c b/lib/common/hil.c
index f3c981278494261c4b7ffc04b6c954d58737f10f..26e0b42792f8d073816209a41118a7435cb73ad0 100644 (file)
--- a/lib/common/hil.c
+++ b/lib/common/hil.c
{
return (config_get_firmware(fw_name, start_addr, size));
}
+
+int hil_poll (struct hil_proc *proc, int nonblock)
+{
+ return proc->ops->poll(proc, nonblock);
+}
index af307d75765e00f5d76874c8659ca20f6149f692..06a13deb17566437016c7e0e9df05377374756f3 100644 (file)
int hil_get_firmware(char *fw_name, unsigned int *start_addr,
unsigned int *size);
+/**
+ * hil_poll
+ *
+ * This function polls the remote processor.
+ * If it is blocking mode, it will not return until the remoteproc
+ * is signaled. If it is non-blocking mode, it will return 0
+ * if the remoteproc has pending signals, it will return non 0
+ * otherwise.
+ *
+ * @param proc - hil_proc to poll
+ * @param nonblock - 0 for blocking, non-0 for non-blocking.
+ *
+ * @return - 0 for no errors, non-0 for errors.
+ */
+int hil_poll (struct hil_proc *proc, int nonblock);
/**
*
* This structure is an interface between HIL and platform porting
*/
void (*shutdown_cpu) (int cpu_id);
+ /**
+ * poll
+ *
+ * This function polls the remote processor.
+ *
+ * @param proc - hil_proc to poll
+ * @param nonblock - 0 for blocking, non-0 for non-blocking.
+ *
+ * @return - 0 for no errors, non-0 for errors.
+ */
+ int (*poll) (struct hil_proc *proc, int nonblock);
+
/**
* initialize
*