summaryrefslogtreecommitdiff
path: root/drivers/remoteproc
diff options
context:
space:
mode:
authorLoic Pallardy <loic.pallardy@st.com>2018-07-27 16:14:41 +0300
committerBjorn Andersson <bjorn.andersson@linaro.org>2018-10-10 08:39:08 +0300
commit15c0b0258e4f1c3c817f34d092d2cc6ff5178bdd (patch)
tree715961a179ffbe84926c1282e4289d38a9af382a /drivers/remoteproc
parent72029c901a0244ca2e1eb09e1c453413a17f5787 (diff)
downloadlinux-15c0b0258e4f1c3c817f34d092d2cc6ff5178bdd.tar.xz
remoteproc: introduce rproc_add_carveout function
This patch introduces a new API to allow platform driver to register platform specific carveout regions. 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 'drivers/remoteproc')
-rw-r--r--drivers/remoteproc/remoteproc_core.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index 9decc598944d..db771e53f097 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -747,7 +747,7 @@ static int rproc_handle_carveout(struct rproc *rproc,
if (!carveout)
goto free_carv;
- list_add_tail(&carveout->node, &rproc->carveouts);
+ rproc_add_carveout(rproc, carveout);
return 0;
@@ -761,6 +761,20 @@ dma_free:
}
/**
+ * rproc_add_carveout() - register an allocated carveout region
+ * @rproc: rproc handle
+ * @mem: memory entry to register
+ *
+ * This function registers specified memory entry in @rproc carveouts list.
+ * Specified carveout should have been allocated before registering.
+ */
+void rproc_add_carveout(struct rproc *rproc, struct rproc_mem_entry *mem)
+{
+ list_add_tail(&mem->node, &rproc->carveouts);
+}
+EXPORT_SYMBOL(rproc_add_carveout);
+
+/**
* rproc_mem_entry_init() - allocate and initialize rproc_mem_entry struct
* @dev: pointer on device struct
* @va: virtual address