diff options
Diffstat (limited to 'include/linux/dma-mapping.h')
-rw-r--r-- | include/linux/dma-mapping.h | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index ba8319ae5fc..347fdc32177 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
@@ -4,17 +4,9 @@ | |||
4 | #include <linux/device.h> | 4 | #include <linux/device.h> |
5 | #include <linux/err.h> | 5 | #include <linux/err.h> |
6 | #include <linux/dma-attrs.h> | 6 | #include <linux/dma-attrs.h> |
7 | #include <linux/dma-direction.h> | ||
7 | #include <linux/scatterlist.h> | 8 | #include <linux/scatterlist.h> |
8 | 9 | ||
9 | /* These definitions mirror those in pci.h, so they can be used | ||
10 | * interchangeably with their PCI_ counterparts */ | ||
11 | enum dma_data_direction { | ||
12 | DMA_BIDIRECTIONAL = 0, | ||
13 | DMA_TO_DEVICE = 1, | ||
14 | DMA_FROM_DEVICE = 2, | ||
15 | DMA_NONE = 3, | ||
16 | }; | ||
17 | |||
18 | struct dma_map_ops { | 10 | struct dma_map_ops { |
19 | void* (*alloc_coherent)(struct device *dev, size_t size, | 11 | void* (*alloc_coherent)(struct device *dev, size_t size, |
20 | dma_addr_t *dma_handle, gfp_t gfp); | 12 | dma_addr_t *dma_handle, gfp_t gfp); |
@@ -54,27 +46,6 @@ struct dma_map_ops { | |||
54 | 46 | ||
55 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) | 47 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) |
56 | 48 | ||
57 | typedef u64 DMA_nnBIT_MASK __deprecated; | ||
58 | |||
59 | /* | ||
60 | * NOTE: do not use the below macros in new code and do not add new definitions | ||
61 | * here. | ||
62 | * | ||
63 | * Instead, just open-code DMA_BIT_MASK(n) within your driver | ||
64 | */ | ||
65 | #define DMA_64BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(64) | ||
66 | #define DMA_48BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(48) | ||
67 | #define DMA_47BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(47) | ||
68 | #define DMA_40BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(40) | ||
69 | #define DMA_39BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(39) | ||
70 | #define DMA_35BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(35) | ||
71 | #define DMA_32BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(32) | ||
72 | #define DMA_31BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(31) | ||
73 | #define DMA_30BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(30) | ||
74 | #define DMA_29BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(29) | ||
75 | #define DMA_28BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(28) | ||
76 | #define DMA_24BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(24) | ||
77 | |||
78 | #define DMA_MASK_NONE 0x0ULL | 49 | #define DMA_MASK_NONE 0x0ULL |
79 | 50 | ||
80 | static inline int valid_dma_direction(int dma_direction) | 51 | static inline int valid_dma_direction(int dma_direction) |