Skip to content

Commit 6c2fb2e

Browse files
rmurphy-armChristoph Hellwig
authored andcommitted
of/device: Set bus DMA mask as appropriate
When an explicit DMA limit is described by firmware, we need to remember it regardless of how drivers might subsequently update their devices' masks. The new bus_dma_mask field does that. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Christoph Hellwig <hch@lst.de>
1 parent d74ea71 commit 6c2fb2e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/of/device.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ int of_dma_configure(struct device *dev, struct device_node *np, bool force_dma)
149149
* set by the driver.
150150
*/
151151
mask = DMA_BIT_MASK(ilog2(dma_addr + size - 1) + 1);
152+
dev->bus_dma_mask = mask;
152153
dev->coherent_dma_mask &= mask;
153154
*dev->dma_mask &= mask;
154155

0 commit comments

Comments
 (0)