diff options
Diffstat (limited to 'include/linux/dma-mapping.h')
-rw-r--r-- | include/linux/dma-mapping.h | 43 |
1 files changed, 28 insertions, 15 deletions
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 8083b6a36a38..07dfd460d286 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
@@ -63,24 +63,26 @@ struct dma_map_ops { | |||
63 | 63 | ||
64 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) | 64 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) |
65 | 65 | ||
66 | typedef u64 DMA_nnBIT_MASK __deprecated; | ||
67 | |||
66 | /* | 68 | /* |
67 | * NOTE: do not use the below macros in new code and do not add new definitions | 69 | * NOTE: do not use the below macros in new code and do not add new definitions |
68 | * here. | 70 | * here. |
69 | * | 71 | * |
70 | * Instead, just open-code DMA_BIT_MASK(n) within your driver | 72 | * Instead, just open-code DMA_BIT_MASK(n) within your driver |
71 | */ | 73 | */ |
72 | #define DMA_64BIT_MASK DMA_BIT_MASK(64) | 74 | #define DMA_64BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(64) |
73 | #define DMA_48BIT_MASK DMA_BIT_MASK(48) | 75 | #define DMA_48BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(48) |
74 | #define DMA_47BIT_MASK DMA_BIT_MASK(47) | 76 | #define DMA_47BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(47) |
75 | #define DMA_40BIT_MASK DMA_BIT_MASK(40) | 77 | #define DMA_40BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(40) |
76 | #define DMA_39BIT_MASK DMA_BIT_MASK(39) | 78 | #define DMA_39BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(39) |
77 | #define DMA_35BIT_MASK DMA_BIT_MASK(35) | 79 | #define DMA_35BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(35) |
78 | #define DMA_32BIT_MASK DMA_BIT_MASK(32) | 80 | #define DMA_32BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(32) |
79 | #define DMA_31BIT_MASK DMA_BIT_MASK(31) | 81 | #define DMA_31BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(31) |
80 | #define DMA_30BIT_MASK DMA_BIT_MASK(30) | 82 | #define DMA_30BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(30) |
81 | #define DMA_29BIT_MASK DMA_BIT_MASK(29) | 83 | #define DMA_29BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(29) |
82 | #define DMA_28BIT_MASK DMA_BIT_MASK(28) | 84 | #define DMA_28BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(28) |
83 | #define DMA_24BIT_MASK DMA_BIT_MASK(24) | 85 | #define DMA_24BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(24) |
84 | 86 | ||
85 | #define DMA_MASK_NONE 0x0ULL | 87 | #define DMA_MASK_NONE 0x0ULL |
86 | 88 | ||
@@ -107,9 +109,20 @@ static inline int is_buffer_dma_capable(u64 mask, dma_addr_t addr, size_t size) | |||
107 | #include <asm-generic/dma-mapping-broken.h> | 109 | #include <asm-generic/dma-mapping-broken.h> |
108 | #endif | 110 | #endif |
109 | 111 | ||
110 | /* Backwards compat, remove in 2.7.x */ | 112 | /* for backwards compatibility, removed soon */ |
111 | #define dma_sync_single dma_sync_single_for_cpu | 113 | static inline void __deprecated dma_sync_single(struct device *dev, |
112 | #define dma_sync_sg dma_sync_sg_for_cpu | 114 | dma_addr_t addr, size_t size, |
115 | enum dma_data_direction dir) | ||
116 | { | ||
117 | dma_sync_single_for_cpu(dev, addr, size, dir); | ||
118 | } | ||
119 | |||
120 | static inline void __deprecated dma_sync_sg(struct device *dev, | ||
121 | struct scatterlist *sg, int nelems, | ||
122 | enum dma_data_direction dir) | ||
123 | { | ||
124 | dma_sync_sg_for_cpu(dev, sg, nelems, dir); | ||
125 | } | ||
113 | 126 | ||
114 | static inline u64 dma_get_mask(struct device *dev) | 127 | static inline u64 dma_get_mask(struct device *dev) |
115 | { | 128 | { |