diff options
author | Robin Murphy <robin.murphy@arm.com> | 2018-07-24 00:16:09 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-07-27 19:01:05 +0200 |
commit | 6c2fb2ea76361da9b420a8e23a2a19e7842cbdda (patch) | |
tree | e5e0af049ac7422e624bfa83d47d832136e6bb8f /drivers/of/device.c | |
parent | ACPI/IORT: Set bus DMA mask as appropriate (diff) | |
download | linux-6c2fb2ea76361da9b420a8e23a2a19e7842cbdda.tar.xz linux-6c2fb2ea76361da9b420a8e23a2a19e7842cbdda.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | drivers/of/device.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/of/device.c b/drivers/of/device.c index 33d85511d790..0d39633e8545 100644 --- a/drivers/of/device.c +++ b/drivers/of/device.c @@ -149,6 +149,7 @@ int of_dma_configure(struct device *dev, struct device_node *np, bool force_dma) * set by the driver. */ mask = DMA_BIT_MASK(ilog2(dma_addr + size - 1) + 1); + dev->bus_dma_mask = mask; dev->coherent_dma_mask &= mask; *dev->dma_mask &= mask; |