summaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/mach-generic
diff options
context:
space:
mode:
authorDavid Daney <ddaney@caviumnetworks.com>2008-12-11 15:33:36 -0800
committerRalf Baechle <ralf@linux-mips.org>2009-01-11 09:57:24 +0000
commit843aef4930b9953c9ca624a990b201440304b56f (patch)
tree9debbaa7d9caa8c73db65ea2674e7ed26e285893 /arch/mips/include/asm/mach-generic
parentec454d8c4fee3b2feb87e594d806c0987c5dd538 (diff)
downloadblackbird-op-linux-843aef4930b9953c9ca624a990b201440304b56f.tar.gz
blackbird-op-linux-843aef4930b9953c9ca624a990b201440304b56f.zip
MIPS: Adjust the dma-common.c platform hooks.
We add a dev parameter to plat_unmap_dma_mem(), and hooks for plat_dma_supported() and plat_extra_sync_for_device() which should be nop changes for all existing targets. Signed-off-by: David Daney <ddaney@caviumnetworks.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/mach-generic')
-rw-r--r--arch/mips/include/asm/mach-generic/dma-coherence.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/arch/mips/include/asm/mach-generic/dma-coherence.h b/arch/mips/include/asm/mach-generic/dma-coherence.h
index 76e04e7feb84..36c611b6c597 100644
--- a/arch/mips/include/asm/mach-generic/dma-coherence.h
+++ b/arch/mips/include/asm/mach-generic/dma-coherence.h
@@ -28,10 +28,34 @@ static inline unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr)
return dma_addr;
}
-static inline void plat_unmap_dma_mem(dma_addr_t dma_addr)
+static inline void plat_unmap_dma_mem(struct device *dev, dma_addr_t dma_addr)
{
}
+static inline int plat_dma_supported(struct device *dev, u64 mask)
+{
+ /*
+ * we fall back to GFP_DMA when the mask isn't all 1s,
+ * so we can't guarantee allocations that must be
+ * within a tighter range than GFP_DMA..
+ */
+ if (mask < DMA_BIT_MASK(24))
+ return 0;
+
+ return 1;
+}
+
+static inline void plat_extra_sync_for_device(struct device *dev)
+{
+ return;
+}
+
+static inline int plat_dma_mapping_error(struct device *dev,
+ dma_addr_t dma_addr)
+{
+ return 0;
+}
+
static inline int plat_device_is_coherent(struct device *dev)
{
#ifdef CONFIG_DMA_COHERENT
OpenPOWER on IntegriCloud