aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze/include/asm/dma-mapping.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/microblaze/include/asm/dma-mapping.h')
-rw-r--r--arch/microblaze/include/asm/dma-mapping.h25
1 files changed, 1 insertions, 24 deletions
diff --git a/arch/microblaze/include/asm/dma-mapping.h b/arch/microblaze/include/asm/dma-mapping.h
index 46460f1c49c4..ab353723076a 100644
--- a/arch/microblaze/include/asm/dma-mapping.h
+++ b/arch/microblaze/include/asm/dma-mapping.h
@@ -35,16 +35,6 @@
35#define __dma_alloc_coherent(dev, gfp, size, handle) NULL 35#define __dma_alloc_coherent(dev, gfp, size, handle) NULL
36#define __dma_free_coherent(size, addr) ((void)0) 36#define __dma_free_coherent(size, addr) ((void)0)
37 37
38static inline unsigned long device_to_mask(struct device *dev)
39{
40 if (dev->dma_mask && *dev->dma_mask)
41 return *dev->dma_mask;
42 /* Assume devices without mask can take 32 bit addresses */
43 return 0xfffffffful;
44}
45
46extern struct dma_map_ops *dma_ops;
47
48/* 38/*
49 * Available generic sets of operations 39 * Available generic sets of operations
50 */ 40 */
@@ -52,20 +42,7 @@ extern struct dma_map_ops dma_direct_ops;
52 42
53static inline struct dma_map_ops *get_dma_ops(struct device *dev) 43static inline struct dma_map_ops *get_dma_ops(struct device *dev)
54{ 44{
55 /* We don't handle the NULL dev case for ISA for now. We could 45 return &dma_direct_ops;
56 * do it via an out of line call but it is not needed for now. The
57 * only ISA DMA device we support is the floppy and we have a hack
58 * in the floppy driver directly to get a device for us.
59 */
60 if (unlikely(!dev) || !dev->archdata.dma_ops)
61 return NULL;
62
63 return dev->archdata.dma_ops;
64}
65
66static inline void set_dma_ops(struct device *dev, struct dma_map_ops *ops)
67{
68 dev->archdata.dma_ops = ops;
69} 46}
70 47
71static inline int dma_supported(struct device *dev, u64 mask) 48static inline int dma_supported(struct device *dev, u64 mask)