diff options
Diffstat (limited to 'drivers/of/device.c')
-rw-r--r-- | drivers/of/device.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/of/device.c b/drivers/of/device.c index 0f27fad9fe94..5592437bb3d1 100644 --- a/drivers/of/device.c +++ b/drivers/of/device.c | |||
@@ -149,9 +149,11 @@ int of_dma_configure(struct device *dev, struct device_node *np, bool force_dma) | |||
149 | * set by the driver. | 149 | * set by the driver. |
150 | */ | 150 | */ |
151 | mask = DMA_BIT_MASK(ilog2(dma_addr + size - 1) + 1); | 151 | mask = DMA_BIT_MASK(ilog2(dma_addr + size - 1) + 1); |
152 | dev->bus_dma_mask = mask; | ||
153 | dev->coherent_dma_mask &= mask; | 152 | dev->coherent_dma_mask &= mask; |
154 | *dev->dma_mask &= mask; | 153 | *dev->dma_mask &= mask; |
154 | /* ...but only set bus mask if we found valid dma-ranges earlier */ | ||
155 | if (!ret) | ||
156 | dev->bus_dma_mask = mask; | ||
155 | 157 | ||
156 | coherent = of_dma_is_coherent(np); | 158 | coherent = of_dma_is_coherent(np); |
157 | dev_dbg(dev, "device is%sdma coherent\n", | 159 | dev_dbg(dev, "device is%sdma coherent\n", |