Commit a3b398e6 authored by Smitha T Murthy's avatar Smitha T Murthy Committed by Rob Herring

of: reserved_mem: set dma_ops for devices using reserved mem

For some IPs, there may be virtual child devices created and for them its
necessary to set the dma_ops if it's using reserved memory else it will call
the dummy dma_ops during buffer operations for the child devices which will
lead to memory mapping failure.
Signed-off-by: default avatarSmitha T Murthy <smitha.t@samsung.com>
Signed-off-by: default avatarPankaj Dubey <pankaj.dubey@samsung.com>
Acked-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 6f05afcb
...@@ -354,6 +354,10 @@ int of_reserved_mem_device_init_by_idx(struct device *dev, ...@@ -354,6 +354,10 @@ int of_reserved_mem_device_init_by_idx(struct device *dev,
mutex_lock(&of_rmem_assigned_device_mutex); mutex_lock(&of_rmem_assigned_device_mutex);
list_add(&rd->list, &of_rmem_assigned_device_list); list_add(&rd->list, &of_rmem_assigned_device_list);
mutex_unlock(&of_rmem_assigned_device_mutex); mutex_unlock(&of_rmem_assigned_device_mutex);
/* ensure that dma_ops is set for virtual devices
* using reserved memory
*/
of_dma_configure(dev, np);
dev_info(dev, "assigned reserved memory node %s\n", rmem->name); dev_info(dev, "assigned reserved memory node %s\n", rmem->name);
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment