summaryrefslogtreecommitdiffstats
path: root/arch/arm/include
diff options
context:
space:
mode:
authorFUJITA Tomonori2010-03-11 00:23:40 +0100
committerLinus Torvalds2010-03-13 00:52:42 +0100
commit6fee48cd330c68332f9712bc968d934a1a84a32a (patch)
treeaaa9b904e612668a46ed4eac64f45c6fde71b45e /arch/arm/include
parentdma-mapping: powerpc: use generic pci_set_dma_mask and pci_set_consistent_dma... (diff)
downloadkernel-qcow2-linux-6fee48cd330c68332f9712bc968d934a1a84a32a.tar.gz
kernel-qcow2-linux-6fee48cd330c68332f9712bc968d934a1a84a32a.tar.xz
kernel-qcow2-linux-6fee48cd330c68332f9712bc968d934a1a84a32a.zip
dma-mapping: arm: use generic pci_set_dma_mask and pci_set_consistent_dma_mask
This converts arm to the generic pci_set_dma_mask and pci_set_consistent_dma_mask (removes HAVE_ARCH_PCI_SET_DMA_MASK for dmabounce). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Looked-over-by: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Cc: Greg KH <greg@kroah.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/asm/dma-mapping.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
index 256ee1c9f51a..69ce0727edb5 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -128,6 +128,14 @@ static inline int dma_supported(struct device *dev, u64 mask)
static inline int dma_set_mask(struct device *dev, u64 dma_mask)
{
+#ifdef CONFIG_DMABOUNCE
+ if (dev->archdata.dmabounce) {
+ if (dma_mask >= ISA_DMA_THRESHOLD)
+ return 0;
+ else
+ return -EIO;
+ }
+#endif
if (!dev->dma_mask || !dma_supported(dev, dma_mask))
return -EIO;