summaryrefslogtreecommitdiff
path: root/include/linux/remoteproc.h
diff options
context:
space:
mode:
authorLoic Pallardy <loic.pallardy@st.com>2018-07-27 15:14:38 +0200
committerBjorn Andersson <bjorn.andersson@linaro.org>2018-10-09 22:39:04 -0700
commitf2e74abfaad446765ce0350aed1d9c5eed5b1b36 (patch)
treead2758e4a3380d2fc62aa16cf9524fd039e168f7 /include/linux/remoteproc.h
parenteb30596eae947ce9072507a3ca112a9dd4601d85 (diff)
remoteproc: add release ops in rproc_mem_entry struct
Memory entry could be allocated in different ways (ioremap, dma_alloc_coherent, internal RAM allocator...). This patch introduces a release ops in rproc_mem_entry structure to associate dedicated release mechanism to each memory entry descriptor in order to keep remoteproc core generic. Signed-off-by: Loic Pallardy <loic.pallardy@st.com> Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'include/linux/remoteproc.h')
-rw-r--r--include/linux/remoteproc.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h
index 75f9ca05b865..4116e92d4b3d 100644
--- a/include/linux/remoteproc.h
+++ b/include/linux/remoteproc.h
@@ -305,12 +305,15 @@ struct fw_rsc_vdev {
struct fw_rsc_vdev_vring vring[0];
} __packed;
+struct rproc;
+
/**
* struct rproc_mem_entry - memory entry descriptor
* @va: virtual address
* @dma: dma address
* @len: length, in bytes
* @da: device address
+ * @release: release associated memory
* @priv: associated data
* @node: list node
*/
@@ -321,9 +324,9 @@ struct rproc_mem_entry {
u32 da;
void *priv;
struct list_head node;
+ int (*release)(struct rproc *rproc, struct rproc_mem_entry *mem);
};
-struct rproc;
struct firmware;
/**