diff options
Diffstat (limited to 'arch/powerpc/include/asm/dma-mapping.h')
-rw-r--r-- | arch/powerpc/include/asm/dma-mapping.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/dma-mapping.h b/arch/powerpc/include/asm/dma-mapping.h index cb448d68452c..3d9e887c3c0c 100644 --- a/arch/powerpc/include/asm/dma-mapping.h +++ b/arch/powerpc/include/asm/dma-mapping.h | |||
@@ -15,9 +15,18 @@ | |||
15 | #include <linux/scatterlist.h> | 15 | #include <linux/scatterlist.h> |
16 | #include <linux/dma-attrs.h> | 16 | #include <linux/dma-attrs.h> |
17 | #include <asm/io.h> | 17 | #include <asm/io.h> |
18 | #include <asm/swiotlb.h> | ||
18 | 19 | ||
19 | #define DMA_ERROR_CODE (~(dma_addr_t)0x0) | 20 | #define DMA_ERROR_CODE (~(dma_addr_t)0x0) |
20 | 21 | ||
22 | /* Some dma direct funcs must be visible for use in other dma_ops */ | ||
23 | extern void *dma_direct_alloc_coherent(struct device *dev, size_t size, | ||
24 | dma_addr_t *dma_handle, gfp_t flag); | ||
25 | extern void dma_direct_free_coherent(struct device *dev, size_t size, | ||
26 | void *vaddr, dma_addr_t dma_handle); | ||
27 | |||
28 | extern unsigned long get_dma_direct_offset(struct device *dev); | ||
29 | |||
21 | #ifdef CONFIG_NOT_COHERENT_CACHE | 30 | #ifdef CONFIG_NOT_COHERENT_CACHE |
22 | /* | 31 | /* |
23 | * DMA-consistent mapping functions for PowerPCs that don't support | 32 | * DMA-consistent mapping functions for PowerPCs that don't support |
@@ -78,6 +87,8 @@ struct dma_mapping_ops { | |||
78 | dma_addr_t dma_address, size_t size, | 87 | dma_addr_t dma_address, size_t size, |
79 | enum dma_data_direction direction, | 88 | enum dma_data_direction direction, |
80 | struct dma_attrs *attrs); | 89 | struct dma_attrs *attrs); |
90 | int (*addr_needs_map)(struct device *dev, dma_addr_t addr, | ||
91 | size_t size); | ||
81 | #ifdef CONFIG_PPC_NEED_DMA_SYNC_OPS | 92 | #ifdef CONFIG_PPC_NEED_DMA_SYNC_OPS |
82 | void (*sync_single_range_for_cpu)(struct device *hwdev, | 93 | void (*sync_single_range_for_cpu)(struct device *hwdev, |
83 | dma_addr_t dma_handle, unsigned long offset, | 94 | dma_addr_t dma_handle, unsigned long offset, |