aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@linaro.org>2018-01-05 18:58:03 -0500
committerBjorn Andersson <bjorn.andersson@linaro.org>2018-01-15 12:29:53 -0500
commit58b640906702bcc083ac783bf10325e22c67d9fc (patch)
treea9464c01c1f24b6977f7fefa67066a2e10eb4fea /include/linux
parentd4bb86f2c39cdd31338dd0274540596aa9ae82c3 (diff)
remoteproc: Move resource table load logic to find
Extend the previous operation of finding the resource table in the ELF with the extra step of populating the rproc struct with a copy and the size. This allows drivers to override the mechanism used for acquiring the resource table, or omit it for firmware that is known not to have a resource table. This leaves the custom, dummy, find_rsc_table implementations found in some drivers dangling. Reviewed-By: Loic Pallardy <loic.pallardy@st.com> Tested-By: Loic Pallardy <loic.pallardy@st.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/remoteproc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h
index ca2021cf7b39..cc853745e3a1 100644
--- a/include/linux/remoteproc.h
+++ b/include/linux/remoteproc.h
@@ -332,6 +332,7 @@ struct firmware;
332 * @stop: power off the device 332 * @stop: power off the device
333 * @kick: kick a virtqueue (virtqueue id given as a parameter) 333 * @kick: kick a virtqueue (virtqueue id given as a parameter)
334 * @da_to_va: optional platform hook to perform address translations 334 * @da_to_va: optional platform hook to perform address translations
335 * @load_rsc_table: load resource table from firmware image
335 * @find_rsc_table: find the resource table inside the firmware image 336 * @find_rsc_table: find the resource table inside the firmware image
336 * @find_loaded_rsc_table: find the loaded resouce table 337 * @find_loaded_rsc_table: find the loaded resouce table
337 * @load: load firmeware to memory, where the remote processor 338 * @load: load firmeware to memory, where the remote processor
@@ -344,6 +345,7 @@ struct rproc_ops {
344 int (*stop)(struct rproc *rproc); 345 int (*stop)(struct rproc *rproc);
345 void (*kick)(struct rproc *rproc, int vqid); 346 void (*kick)(struct rproc *rproc, int vqid);
346 void * (*da_to_va)(struct rproc *rproc, u64 da, int len); 347 void * (*da_to_va)(struct rproc *rproc, u64 da, int len);
348 int (*load_rsc_table)(struct rproc *rproc, const struct firmware *fw);
347 struct resource_table *(*find_rsc_table)(struct rproc *rproc, 349 struct resource_table *(*find_rsc_table)(struct rproc *rproc,
348 const struct firmware *fw, 350 const struct firmware *fw,
349 int *tablesz); 351 int *tablesz);