remoteproc: add device_to_virt ops
authorFabien Dessenne <fabien.dessenne@st.com>
Fri, 31 May 2019 13:11:32 +0000 (15:11 +0200)
committerPatrick Delaunay <patrick.delaunay@st.com>
Mon, 22 Jul 2019 07:21:28 +0000 (09:21 +0200)
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 <loic.pallardy@st.com>
Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
include/remoteproc.h

index aa90a67fbabec23d592989d371a338cd1638ec48..aef6ff2e49be1cc40fcb26061c94a1d8bbd23c90 100644 (file)
@@ -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 */