aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/asm-m68k/dma-mapping.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/asm-m68k/dma-mapping.h b/include/asm-m68k/dma-mapping.h
index 4f8575edd81d..cebbb03370ec 100644
--- a/include/asm-m68k/dma-mapping.h
+++ b/include/asm-m68k/dma-mapping.h
@@ -1,6 +1,8 @@
1#ifndef _M68K_DMA_MAPPING_H 1#ifndef _M68K_DMA_MAPPING_H
2#define _M68K_DMA_MAPPING_H 2#define _M68K_DMA_MAPPING_H
3 3
4#include <asm/cache.h>
5
4struct scatterlist; 6struct scatterlist;
5 7
6static inline int dma_supported(struct device *dev, u64 mask) 8static inline int dma_supported(struct device *dev, u64 mask)
@@ -13,11 +15,37 @@ static inline int dma_set_mask(struct device *dev, u64 mask)
13 return 0; 15 return 0;
14} 16}
15 17
18static inline int dma_get_cache_alignment(void)
19{
20 return 1 << L1_CACHE_SHIFT;
21}
22
23static inline int dma_is_consistent(dma_addr_t dma_addr)
24{
25 return 0;
26}
27
16extern void *dma_alloc_coherent(struct device *, size_t, 28extern void *dma_alloc_coherent(struct device *, size_t,
17 dma_addr_t *, int); 29 dma_addr_t *, int);
18extern void dma_free_coherent(struct device *, size_t, 30extern void dma_free_coherent(struct device *, size_t,
19 void *, dma_addr_t); 31 void *, dma_addr_t);
20 32
33static inline void *dma_alloc_noncoherent(struct device *dev, size_t size,
34 dma_addr_t *handle, int flag)
35{
36 return dma_alloc_coherent(dev, size, handle, flag);
37}
38static inline void dma_free_noncoherent(struct device *dev, size_t size,
39 void *addr, dma_addr_t handle)
40{
41 dma_free_coherent(dev, size, addr, handle);
42}
43static inline void dma_cache_sync(void *vaddr, size_t size,
44 enum dma_data_direction dir)
45{
46 /* we use coherent allocation, so not much to do here. */
47}
48
21extern dma_addr_t dma_map_single(struct device *, void *, size_t, 49extern dma_addr_t dma_map_single(struct device *, void *, size_t,
22 enum dma_data_direction); 50 enum dma_data_direction);
23static inline void dma_unmap_single(struct device *dev, dma_addr_t addr, 51static inline void dma_unmap_single(struct device *dev, dma_addr_t addr,