diff options
Diffstat (limited to 'include/linux/dma-noncoherent.h')
-rw-r--r-- | include/linux/dma-noncoherent.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/include/linux/dma-noncoherent.h b/include/linux/dma-noncoherent.h index 0bff3d7fac92..dd3de6d88fc0 100644 --- a/include/linux/dma-noncoherent.h +++ b/include/linux/dma-noncoherent.h | |||
@@ -3,6 +3,7 @@ | |||
3 | #define _LINUX_DMA_NONCOHERENT_H 1 | 3 | #define _LINUX_DMA_NONCOHERENT_H 1 |
4 | 4 | ||
5 | #include <linux/dma-mapping.h> | 5 | #include <linux/dma-mapping.h> |
6 | #include <asm/pgtable.h> | ||
6 | 7 | ||
7 | #ifdef CONFIG_ARCH_HAS_DMA_COHERENCE_H | 8 | #ifdef CONFIG_ARCH_HAS_DMA_COHERENCE_H |
8 | #include <asm/dma-coherence.h> | 9 | #include <asm/dma-coherence.h> |
@@ -42,10 +43,18 @@ void arch_dma_free(struct device *dev, size_t size, void *cpu_addr, | |||
42 | dma_addr_t dma_addr, unsigned long attrs); | 43 | dma_addr_t dma_addr, unsigned long attrs); |
43 | long arch_dma_coherent_to_pfn(struct device *dev, void *cpu_addr, | 44 | long arch_dma_coherent_to_pfn(struct device *dev, void *cpu_addr, |
44 | dma_addr_t dma_addr); | 45 | dma_addr_t dma_addr); |
45 | pgprot_t arch_dma_mmap_pgprot(struct device *dev, pgprot_t prot, | ||
46 | unsigned long attrs); | ||
47 | 46 | ||
48 | #ifdef CONFIG_MMU | 47 | #ifdef CONFIG_MMU |
48 | /* | ||
49 | * Page protection so that devices that can't snoop CPU caches can use the | ||
50 | * memory coherently. We default to pgprot_noncached which is usually used | ||
51 | * for ioremap as a safe bet, but architectures can override this with less | ||
52 | * strict semantics if possible. | ||
53 | */ | ||
54 | #ifndef pgprot_dmacoherent | ||
55 | #define pgprot_dmacoherent(prot) pgprot_noncached(prot) | ||
56 | #endif | ||
57 | |||
49 | pgprot_t dma_pgprot(struct device *dev, pgprot_t prot, unsigned long attrs); | 58 | pgprot_t dma_pgprot(struct device *dev, pgprot_t prot, unsigned long attrs); |
50 | #else | 59 | #else |
51 | static inline pgprot_t dma_pgprot(struct device *dev, pgprot_t prot, | 60 | static inline pgprot_t dma_pgprot(struct device *dev, pgprot_t prot, |