From 58b640906702bcc083ac783bf10325e22c67d9fc Mon Sep 17 00:00:00 2001 From: Bjorn Andersson Date: Fri, 5 Jan 2018 15:58:03 -0800 Subject: 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 Tested-By: Loic Pallardy Signed-off-by: Bjorn Andersson --- include/linux/remoteproc.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') 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); -- cgit v1.2.3