diff options
-rw-r--r-- | arch/ia64/include/asm/dma-mapping.h | 10 | ||||
-rw-r--r-- | arch/powerpc/include/asm/dma-mapping.h | 10 | ||||
-rw-r--r-- | arch/x86/include/asm/dma-mapping.h | 10 |
3 files changed, 30 insertions, 0 deletions
diff --git a/arch/ia64/include/asm/dma-mapping.h b/arch/ia64/include/asm/dma-mapping.h index 88d0f860394d..f91829de329f 100644 --- a/arch/ia64/include/asm/dma-mapping.h +++ b/arch/ia64/include/asm/dma-mapping.h | |||
@@ -77,6 +77,16 @@ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size) | |||
77 | return addr + size <= *dev->dma_mask; | 77 | return addr + size <= *dev->dma_mask; |
78 | } | 78 | } |
79 | 79 | ||
80 | static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr) | ||
81 | { | ||
82 | return paddr; | ||
83 | } | ||
84 | |||
85 | static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr) | ||
86 | { | ||
87 | return daddr; | ||
88 | } | ||
89 | |||
80 | extern int dma_get_cache_alignment(void); | 90 | extern int dma_get_cache_alignment(void); |
81 | 91 | ||
82 | static inline void | 92 | static inline void |
diff --git a/arch/powerpc/include/asm/dma-mapping.h b/arch/powerpc/include/asm/dma-mapping.h index 6ff1f8581d79..0c34371ec49c 100644 --- a/arch/powerpc/include/asm/dma-mapping.h +++ b/arch/powerpc/include/asm/dma-mapping.h | |||
@@ -437,6 +437,16 @@ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size) | |||
437 | return addr + size <= *dev->dma_mask; | 437 | return addr + size <= *dev->dma_mask; |
438 | } | 438 | } |
439 | 439 | ||
440 | static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr) | ||
441 | { | ||
442 | return paddr + get_dma_direct_offset(dev); | ||
443 | } | ||
444 | |||
445 | static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr) | ||
446 | { | ||
447 | return daddr - get_dma_direct_offset(dev); | ||
448 | } | ||
449 | |||
440 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) | 450 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) |
441 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) | 451 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) |
442 | #ifdef CONFIG_NOT_COHERENT_CACHE | 452 | #ifdef CONFIG_NOT_COHERENT_CACHE |
diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h index adac59c8f69b..0ee770d23d0e 100644 --- a/arch/x86/include/asm/dma-mapping.h +++ b/arch/x86/include/asm/dma-mapping.h | |||
@@ -63,6 +63,16 @@ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size) | |||
63 | return addr + size <= *dev->dma_mask; | 63 | return addr + size <= *dev->dma_mask; |
64 | } | 64 | } |
65 | 65 | ||
66 | static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr) | ||
67 | { | ||
68 | return paddr; | ||
69 | } | ||
70 | |||
71 | static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr) | ||
72 | { | ||
73 | return daddr; | ||
74 | } | ||
75 | |||
66 | static inline void | 76 | static inline void |
67 | dma_cache_sync(struct device *dev, void *vaddr, size_t size, | 77 | dma_cache_sync(struct device *dev, void *vaddr, size_t size, |
68 | enum dma_data_direction dir) | 78 | enum dma_data_direction dir) |