From: Fabien Dessenne Date: Fri, 31 May 2019 13:11:32 +0000 (+0200) Subject: remoteproc: add device_to_virt ops X-Git-Tag: v2025.01-rc5-pxa1908~2874^2~10 X-Git-Url: http://git.dujemihanovic.xyz/img/static/%7B%7B%20%24image.RelPermalink%20%7D%7D?a=commitdiff_plain;h=163b7d7706d842517c5c77e649290be557ad578b;p=u-boot.git remoteproc: add device_to_virt ops Introduce the device_to_virt function to allow translation between device address (remote processor view) and virtual address (main processor view). Signed-off-by: Loic Pallardy Signed-off-by: Fabien Dessenne Reviewed-by: Lokesh Vutla --- diff --git a/include/remoteproc.h b/include/remoteproc.h index aa90a67fba..aef6ff2e49 100644 --- a/include/remoteproc.h +++ b/include/remoteproc.h @@ -113,6 +113,18 @@ struct dm_rproc_ops { * @return 0 on success, 1 if not responding, -ve on other errors. */ int (*ping)(struct udevice *dev); + + /** + * device_to_virt() - Return translated virtual address (optional) + * + * Translate a device address (remote processor view) to virtual + * address (main processor view). + * + * @dev: Remote proc device + * @da: Device address + * @return virtual address. + */ + void * (*device_to_virt)(struct udevice *dev, ulong da); }; /* Accessor */