aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/remoteproc.h
diff options
context:
space:
mode:
authorLoic Pallardy <loic.pallardy@st.com>2018-07-27 15:14:44 +0200
committerBjorn Andersson <bjorn.andersson@linaro.org>2018-10-09 22:39:14 -0700
commit1429cca1175f4cb64dd5d61ffd6037895a41d672 (patch)
tree3d62e3b206f6da65bf01f9d160698b6dcb927f68 /include/linux/remoteproc.h
parentremoteproc: add alloc ops in rproc_mem_entry struct (diff)
downloadwireguard-linux-1429cca1175f4cb64dd5d61ffd6037895a41d672.tar.xz
wireguard-linux-1429cca1175f4cb64dd5d61ffd6037895a41d672.zip
remoteproc: add helper function to allocate rproc_mem_entry from reserved memory
This patch introduces rproc_res_mem_entry_init() helper function to allocate a rproc_mem_entry structure from a reserved memory region. In that case, rproc_mem_entry structure has no alloc and release ops. It will be used to assigned the specified reserved memory to any rproc sub device. Relation between rproc_mem_entry and rproc sub device will be done by name. Signed-off-by: Loic Pallardy <loic.pallardy@st.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'include/linux/remoteproc.h')
-rw-r--r--include/linux/remoteproc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h
index d251c091303c..d4cabe8da507 100644
--- a/include/linux/remoteproc.h
+++ b/include/linux/remoteproc.h
@@ -319,6 +319,7 @@ struct rproc;
* @node: list node
* @rsc_offset: offset in resource table
* @flags: iommu protection flags
+ * @of_resm_idx: reserved memory phandle index
* @alloc: specific memory allocator function
*/
struct rproc_mem_entry {
@@ -331,6 +332,7 @@ struct rproc_mem_entry {
struct list_head node;
u32 rsc_offset;
u32 flags;
+ u32 of_resm_idx;
int (*alloc)(struct rproc *rproc, struct rproc_mem_entry *mem);
int (*release)(struct rproc *rproc, struct rproc_mem_entry *mem);
};
@@ -574,6 +576,10 @@ rproc_mem_entry_init(struct device *dev,
int (*release)(struct rproc *, struct rproc_mem_entry *),
const char *name, ...);
+struct rproc_mem_entry *
+rproc_of_resm_mem_entry_init(struct device *dev, u32 of_resm_idx, int len,
+ u32 da, const char *name, ...);
+
int rproc_boot(struct rproc *rproc);
void rproc_shutdown(struct rproc *rproc);
void rproc_report_crash(struct rproc *rproc, enum rproc_crash_type type);