summaryrefslogtreecommitdiffstats
path: root/include/linux/remoteproc.h
diff options
context:
space:
mode:
authorSuman Anna <s-anna@ti.com>2015-05-22 16:45:28 -0400
committerOhad Ben-Cohen <ohad@wizery.com>2015-06-17 02:57:12 -0400
commita01f7cd657c95941079d548ef7fbf0cc370c1259 (patch)
tree6e4934670eb2b157dd1e2049180f3d0f8c046aae /include/linux/remoteproc.h
parentfec47d863587c272d6fbf4e50066209c953d5e60 (diff)
remoteproc: add a rproc ops for performing address translation
The rproc_da_to_va API is currently used to perform any device to kernel address translations to meet the different needs of the remoteproc core/drivers (eg: loading). The functionality is achieved within the remoteproc core, and is limited only for carveouts allocated within the core. A new rproc ops, da_to_va, is added to provide flexibility to platform implementations to perform the address translation themselves when the above conditions cannot be met by the implementations. The rproc_da_to_va() API is extended to invoke this ops if present, and fallback to regular processing if the platform implementation cannot provide the translation. This will allow any remoteproc implementations to translate addresses for dedicated memories like internal memories. While at this, also update the rproc_da_to_va() documentation since it is an exported function. Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Dave Gerlach <d-gerlach@ti.com> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Diffstat (limited to 'include/linux/remoteproc.h')
-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 56739e5df1e6..9c4e1384f636 100644
--- a/include/linux/remoteproc.h
+++ b/include/linux/remoteproc.h
@@ -330,11 +330,13 @@ struct rproc;
330 * @start: power on the device and boot it 330 * @start: power on the device and boot it
331 * @stop: power off the device 331 * @stop: power off the device
332 * @kick: kick a virtqueue (virtqueue id given as a parameter) 332 * @kick: kick a virtqueue (virtqueue id given as a parameter)
333 * @da_to_va: optional platform hook to perform address translations
333 */ 334 */
334struct rproc_ops { 335struct rproc_ops {
335 int (*start)(struct rproc *rproc); 336 int (*start)(struct rproc *rproc);
336 int (*stop)(struct rproc *rproc); 337 int (*stop)(struct rproc *rproc);
337 void (*kick)(struct rproc *rproc, int vqid); 338 void (*kick)(struct rproc *rproc, int vqid);
339 void * (*da_to_va)(struct rproc *rproc, u64 da, int len);
338}; 340};
339 341
340/** 342/**