summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds2018-09-03 05:09:36 +0200
committerLinus Torvalds2018-09-03 05:09:36 +0200
commit60c1f89241d49bacf71035470684a8d7b4bb46ea (patch)
treef545bc7a0ddd189b956e65353f36661f4fc12ae1 /drivers
parentLinux 4.19-rc2 (diff)
parentof/platform: initialise AMBA default DMA masks (diff)
downloadkernel-qcow2-linux-60c1f89241d49bacf71035470684a8d7b4bb46ea.tar.gz
kernel-qcow2-linux-60c1f89241d49bacf71035470684a8d7b4bb46ea.tar.xz
kernel-qcow2-linux-60c1f89241d49bacf71035470684a8d7b4bb46ea.zip
Merge tag 'dma-mapping-4.19-2' of git://git.infradead.org/users/hch/dma-mapping
Pull dma-mapping fixes from Christoph Hellwig: "A few fixes for the fallout of being a little more pedantic about dma masks" * tag 'dma-mapping-4.19-2' of git://git.infradead.org/users/hch/dma-mapping: of/platform: initialise AMBA default DMA masks sparc: set a default 32-bit dma mask for OF devices kernel/dma/direct: take DMA offset into account in dma_direct_supported
Diffstat (limited to 'drivers')
-rw-r--r--drivers/of/platform.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 7ba90c290a42..6c59673933e9 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -241,6 +241,10 @@ static struct amba_device *of_amba_device_create(struct device_node *node,
if (!dev)
goto err_clear_flag;
+ /* AMBA devices only support a single DMA mask */
+ dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
+ dev->dev.dma_mask = &dev->dev.coherent_dma_mask;
+
/* setup generic device info */
dev->dev.of_node = of_node_get(node);
dev->dev.fwnode = &node->fwnode;