aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dma-mapping.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/dma-mapping.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/linux/dma-mapping.h')
-rw-r--r--include/linux/dma-mapping.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
new file mode 100644
index 000000000000..806c305332c1
--- /dev/null
+++ b/include/linux/dma-mapping.h
@@ -0,0 +1,56 @@
1#ifndef _ASM_LINUX_DMA_MAPPING_H
2#define _ASM_LINUX_DMA_MAPPING_H
3
4#include <linux/device.h>
5#include <linux/err.h>
6
7/* These definitions mirror those in pci.h, so they can be used
8 * interchangeably with their PCI_ counterparts */
9enum dma_data_direction {
10 DMA_BIDIRECTIONAL = 0,
11 DMA_TO_DEVICE = 1,
12 DMA_FROM_DEVICE = 2,
13 DMA_NONE = 3,
14};
15
16#define DMA_64BIT_MASK 0xffffffffffffffffULL
17#define DMA_32BIT_MASK 0x00000000ffffffffULL
18
19#include <asm/dma-mapping.h>
20
21/* Backwards compat, remove in 2.7.x */
22#define dma_sync_single dma_sync_single_for_cpu
23#define dma_sync_sg dma_sync_sg_for_cpu
24
25extern u64 dma_get_required_mask(struct device *dev);
26
27/* flags for the coherent memory api */
28#define DMA_MEMORY_MAP 0x01
29#define DMA_MEMORY_IO 0x02
30#define DMA_MEMORY_INCLUDES_CHILDREN 0x04
31#define DMA_MEMORY_EXCLUSIVE 0x08
32
33#ifndef ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY
34static inline int
35dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
36 dma_addr_t device_addr, size_t size, int flags)
37{
38 return 0;
39}
40
41static inline void
42dma_release_declared_memory(struct device *dev)
43{
44}
45
46static inline void *
47dma_mark_declared_memory_occupied(struct device *dev,
48 dma_addr_t device_addr, size_t size)
49{
50 return ERR_PTR(-EBUSY);
51}
52#endif
53
54#endif
55
56