diff options
author | Loic Pallardy <loic.pallardy@st.com> | 2018-07-27 15:14:38 +0200 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2018-10-10 07:39:04 +0200 |
commit | f2e74abfaad446765ce0350aed1d9c5eed5b1b36 (patch) | |
tree | ad2758e4a3380d2fc62aa16cf9524fd039e168f7 /include | |
parent | remoteproc: add rproc_va_to_pa function (diff) | |
download | linux-f2e74abfaad446765ce0350aed1d9c5eed5b1b36.tar.xz linux-f2e74abfaad446765ce0350aed1d9c5eed5b1b36.zip |
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')
-rw-r--r-- | include/linux/remoteproc.h | 5 |
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; /** |