aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-10-20 06:18:40 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-12-13 04:12:07 -0500
commit1124d6d21f80ec10cc962e2961c21a8dd1e0ca6a (patch)
tree0eb7f2bb830ed93daeb864cd554a00912356b3c4 /arch/arm/include
parent70d13e083c8589dd3edc2313777655da39cb3568 (diff)
[ARM] dma: correct dma_supported() implementation
dma_supported() is supposed to indicate whether the system can support the DMA mask it was passed, which depends on the maximal address which can be returned for DMA allocations. If the mask is smaller than that, we are unable to guarantee that the driver can reliably obtain suitable memory. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/asm/dma-mapping.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
index 4ed149cbb32a..22cb14ec3438 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -69,7 +69,9 @@ extern void dma_cache_maint(const void *kaddr, size_t size, int rw);
69 */ 69 */
70static inline int dma_supported(struct device *dev, u64 mask) 70static inline int dma_supported(struct device *dev, u64 mask)
71{ 71{
72 return dev->dma_mask && *dev->dma_mask != 0; 72 if (mask < ISA_DMA_THRESHOLD)
73 return 0;
74 return 1;
73} 75}
74 76
75static inline int dma_set_mask(struct device *dev, u64 dma_mask) 77static inline int dma_set_mask(struct device *dev, u64 dma_mask)