remoteproc: ops: Add elf section size as input parameter to device_to_virt api
Introduce a new parameter "size" that accepts size of the region to
remoteproc ops callback device_to_virt(). This can enforce more checks
on the region that device_to_virt() is dealing with.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Tested-by: Fabien Dessenne <fabien.dessenne@st.com>
Reviewed-by: Fabien Dessenne <fabien.dessenne@st.com>
diff --git a/include/remoteproc.h b/include/remoteproc.h
index 4987194..dbff1ce 100644
--- a/include/remoteproc.h
+++ b/include/remoteproc.h
@@ -122,9 +122,10 @@
*
* @dev: Remote proc device
* @da: Device address
+ * @size: Size of the memory region @da is pointing to
* @return virtual address.
*/
- void * (*device_to_virt)(struct udevice *dev, ulong da);
+ void * (*device_to_virt)(struct udevice *dev, ulong da, ulong size);
};
/* Accessor */