diff options
author | Claire Chang | 2021-06-19 11:40:43 +0800 |
---|---|---|
committer | Konrad Rzeszutek Wilk | 2021-07-13 20:04:53 -0400 |
commit | fec9b625095f7308e52a6922619cd4abaa9534a8 (patch) | |
tree | bc5495ba83cb96359a1b802e33d317127d7bb3b9 /drivers/of/device.c | |
parent | b12fe999545cf3fd89e1a178ee4e541a9331da82 (diff) |
of: Add plumbing for restricted DMA pool
If a device is not behind an IOMMU, we look up the device node and set
up the restricted DMA when the restricted-dma-pool is presented.
Signed-off-by: Claire Chang <tientzu@chromium.org>
Tested-by: Stefano Stabellini <sstabellini@kernel.org>
Tested-by: Will Deacon <will@kernel.org>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/of/device.c')
-rw-r--r-- | drivers/of/device.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/of/device.c b/drivers/of/device.c index c5a9473a5fb1..2defdca418ec 100644 --- a/drivers/of/device.c +++ b/drivers/of/device.c @@ -165,6 +165,9 @@ int of_dma_configure_id(struct device *dev, struct device_node *np, arch_setup_dma_ops(dev, dma_start, size, iommu, coherent); + if (!iommu) + return of_dma_set_restricted_buffer(dev, np); + return 0; } EXPORT_SYMBOL_GPL(of_dma_configure_id); |