diff options
author | Bjorn Andersson <bjorn.andersson@linaro.org> | 2018-01-06 02:58:03 +0300 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2018-01-15 20:29:53 +0300 |
commit | 58b640906702bcc083ac783bf10325e22c67d9fc (patch) | |
tree | a9464c01c1f24b6977f7fefa67066a2e10eb4fea /include/linux/remoteproc.h | |
parent | d4bb86f2c39cdd31338dd0274540596aa9ae82c3 (diff) | |
download | linux-58b640906702bcc083ac783bf10325e22c67d9fc.tar.xz |
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/remoteproc.h')
-rw-r--r-- | include/linux/remoteproc.h | 2 |
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; * @stop: power off the device * @kick: kick a virtqueue (virtqueue id given as a parameter) * @da_to_va: optional platform hook to perform address translations + * @load_rsc_table: load resource table from firmware image * @find_rsc_table: find the resource table inside the firmware image * @find_loaded_rsc_table: find the loaded resouce table * @load: load firmeware to memory, where the remote processor @@ -344,6 +345,7 @@ struct rproc_ops { int (*stop)(struct rproc *rproc); void (*kick)(struct rproc *rproc, int vqid); void * (*da_to_va)(struct rproc *rproc, u64 da, int len); + int (*load_rsc_table)(struct rproc *rproc, const struct firmware *fw); struct resource_table *(*find_rsc_table)(struct rproc *rproc, const struct firmware *fw, int *tablesz); |