summaryrefslogtreecommitdiffstats
path: root/drivers/of/of_reserved_mem.c
diff options
context:
space:
mode:
authorSmitha T Murthy <smitha.t@samsung.com>2016-12-21 11:14:31 +0530
committerRob Herring <robh@kernel.org>2017-01-04 14:00:45 -0600
commita3b398e6f2f169f09e60ba99745ca444d7de693e (patch)
treeb7c35287f362500cb164ae770fcbd953e1fdf2d6 /drivers/of/of_reserved_mem.c
parent6f05afcbb031722ec1eff77dde188ff2edf8940e (diff)
downloadlinux-a3b398e6f2f169f09e60ba99745ca444d7de693e.tar.bz2
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: Smitha T Murthy <smitha.t@samsung.com> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of/of_reserved_mem.c')
-rw-r--r--drivers/of/of_reserved_mem.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
index 366d8c3c7989..d507c3569a88 100644
--- a/drivers/of/of_reserved_mem.c
+++ b/drivers/of/of_reserved_mem.c
@@ -354,6 +354,10 @@ int of_reserved_mem_device_init_by_idx(struct device *dev,
mutex_lock(&of_rmem_assigned_device_mutex);
list_add(&rd->list, &of_rmem_assigned_device_list);
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);
} else {