diff options
| author | Ralf Baechle <ralf@linux-mips.org> | 2015-03-27 10:10:30 -0400 |
|---|---|---|
| committer | Ralf Baechle <ralf@linux-mips.org> | 2015-04-01 11:22:01 -0400 |
| commit | 0acbfc66d09e97e5a01e7a23ac7e99f360ff851b (patch) | |
| tree | e4dbdaefd70d249bd5fd15a862a55253ba5dc116 /arch/mips/include | |
| parent | 253073801363e5cea3cd368fed1afc3111a21c35 (diff) | |
MIPS: DMA: Implement platform hook to perform post-DMA cache flushes.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include')
8 files changed, 32 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mach-ath25/dma-coherence.h b/arch/mips/include/asm/mach-ath25/dma-coherence.h index 65084a079b60..d5defdde32db 100644 --- a/arch/mips/include/asm/mach-ath25/dma-coherence.h +++ b/arch/mips/include/asm/mach-ath25/dma-coherence.h | |||
| @@ -69,4 +69,8 @@ static inline int plat_device_is_coherent(struct device *dev) | |||
| 69 | #endif | 69 | #endif |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | static inline void plat_post_dma_flush(struct device *dev) | ||
| 73 | { | ||
| 74 | } | ||
| 75 | |||
| 72 | #endif /* __ASM_MACH_ATH25_DMA_COHERENCE_H */ | 76 | #endif /* __ASM_MACH_ATH25_DMA_COHERENCE_H */ |
diff --git a/arch/mips/include/asm/mach-bmips/dma-coherence.h b/arch/mips/include/asm/mach-bmips/dma-coherence.h index 65e95b03ef92..509ab72725eb 100644 --- a/arch/mips/include/asm/mach-bmips/dma-coherence.h +++ b/arch/mips/include/asm/mach-bmips/dma-coherence.h | |||
| @@ -45,4 +45,8 @@ static inline int plat_device_is_coherent(struct device *dev) | |||
| 45 | return 0; | 45 | return 0; |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | static inline void plat_post_dma_flush(struct device *dev) | ||
| 49 | { | ||
| 50 | } | ||
| 51 | |||
| 48 | #endif /* __ASM_MACH_BMIPS_DMA_COHERENCE_H */ | 52 | #endif /* __ASM_MACH_BMIPS_DMA_COHERENCE_H */ |
diff --git a/arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h b/arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h index f9f448650505..460042ee5d6f 100644 --- a/arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h +++ b/arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h | |||
| @@ -57,6 +57,10 @@ static inline int plat_device_is_coherent(struct device *dev) | |||
| 57 | return 1; | 57 | return 1; |
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | static inline void plat_post_dma_flush(struct device *dev) | ||
| 61 | { | ||
| 62 | } | ||
| 63 | |||
| 60 | dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr); | 64 | dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr); |
| 61 | phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr); | 65 | phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr); |
| 62 | 66 | ||
diff --git a/arch/mips/include/asm/mach-generic/dma-coherence.h b/arch/mips/include/asm/mach-generic/dma-coherence.h index 7629c35986f7..671330928e67 100644 --- a/arch/mips/include/asm/mach-generic/dma-coherence.h +++ b/arch/mips/include/asm/mach-generic/dma-coherence.h | |||
| @@ -52,6 +52,10 @@ static inline int plat_device_is_coherent(struct device *dev) | |||
| 52 | return coherentio; | 52 | return coherentio; |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | static inline void plat_post_dma_flush(struct device *dev) | ||
| 56 | { | ||
| 57 | } | ||
| 58 | |||
| 55 | #ifdef CONFIG_SWIOTLB | 59 | #ifdef CONFIG_SWIOTLB |
| 56 | static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr) | 60 | static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr) |
| 57 | { | 61 | { |
diff --git a/arch/mips/include/asm/mach-ip27/dma-coherence.h b/arch/mips/include/asm/mach-ip27/dma-coherence.h index 4ffddfdb5062..1daa64412569 100644 --- a/arch/mips/include/asm/mach-ip27/dma-coherence.h +++ b/arch/mips/include/asm/mach-ip27/dma-coherence.h | |||
| @@ -58,6 +58,10 @@ static inline int plat_dma_supported(struct device *dev, u64 mask) | |||
| 58 | return 1; | 58 | return 1; |
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | static inline void plat_post_dma_flush(struct device *dev) | ||
| 62 | { | ||
| 63 | } | ||
| 64 | |||
| 61 | static inline int plat_device_is_coherent(struct device *dev) | 65 | static inline int plat_device_is_coherent(struct device *dev) |
| 62 | { | 66 | { |
| 63 | return 1; /* IP27 non-cohernet mode is unsupported */ | 67 | return 1; /* IP27 non-cohernet mode is unsupported */ |
diff --git a/arch/mips/include/asm/mach-ip32/dma-coherence.h b/arch/mips/include/asm/mach-ip32/dma-coherence.h index 104cfbc3ed63..0a0b0e2ced60 100644 --- a/arch/mips/include/asm/mach-ip32/dma-coherence.h +++ b/arch/mips/include/asm/mach-ip32/dma-coherence.h | |||
| @@ -80,6 +80,10 @@ static inline int plat_dma_supported(struct device *dev, u64 mask) | |||
| 80 | return 1; | 80 | return 1; |
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | static inline void plat_post_dma_flush(struct device *dev) | ||
| 84 | { | ||
| 85 | } | ||
| 86 | |||
| 83 | static inline int plat_device_is_coherent(struct device *dev) | 87 | static inline int plat_device_is_coherent(struct device *dev) |
| 84 | { | 88 | { |
| 85 | return 0; /* IP32 is non-cohernet */ | 89 | return 0; /* IP32 is non-cohernet */ |
diff --git a/arch/mips/include/asm/mach-jazz/dma-coherence.h b/arch/mips/include/asm/mach-jazz/dma-coherence.h index 949003ef97b3..dc347c25c343 100644 --- a/arch/mips/include/asm/mach-jazz/dma-coherence.h +++ b/arch/mips/include/asm/mach-jazz/dma-coherence.h | |||
| @@ -48,6 +48,10 @@ static inline int plat_dma_supported(struct device *dev, u64 mask) | |||
| 48 | return 1; | 48 | return 1; |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | static inline void plat_post_dma_flush(struct device *dev) | ||
| 52 | { | ||
| 53 | } | ||
| 54 | |||
| 51 | static inline int plat_device_is_coherent(struct device *dev) | 55 | static inline int plat_device_is_coherent(struct device *dev) |
| 52 | { | 56 | { |
| 53 | return 0; | 57 | return 0; |
diff --git a/arch/mips/include/asm/mach-loongson/dma-coherence.h b/arch/mips/include/asm/mach-loongson/dma-coherence.h index a90534161bd2..4bf4e19f72e8 100644 --- a/arch/mips/include/asm/mach-loongson/dma-coherence.h +++ b/arch/mips/include/asm/mach-loongson/dma-coherence.h | |||
| @@ -78,4 +78,8 @@ static inline int plat_device_is_coherent(struct device *dev) | |||
| 78 | #endif /* CONFIG_DMA_NONCOHERENT */ | 78 | #endif /* CONFIG_DMA_NONCOHERENT */ |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | static inline void plat_post_dma_flush(struct device *dev) | ||
| 82 | { | ||
| 83 | } | ||
| 84 | |||
| 81 | #endif /* __ASM_MACH_LOONGSON_DMA_COHERENCE_H */ | 85 | #endif /* __ASM_MACH_LOONGSON_DMA_COHERENCE_H */ |
