--- zzzz-none-000/linux-3.10.107/arch/mips/include/asm/mach-generic/dma-coherence.h 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/arch/mips/include/asm/mach-generic/dma-coherence.h 2021-02-04 17:41:59.000000000 +0000 @@ -47,23 +47,27 @@ return 1; } -static inline void plat_extra_sync_for_device(struct device *dev) +static inline int plat_device_is_coherent(struct device *dev) { + return coherentio; } -static inline int plat_dma_mapping_error(struct device *dev, - dma_addr_t dma_addr) +#ifndef plat_post_dma_flush +static inline void plat_post_dma_flush(struct device *dev) { - return 0; } +#endif -static inline int plat_device_is_coherent(struct device *dev) +#ifdef CONFIG_SWIOTLB +static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr) { -#ifdef CONFIG_DMA_COHERENT - return 1; -#else - return coherentio; -#endif + return paddr; } +static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr) +{ + return daddr; +} +#endif + #endif /* __ASM_MACH_GENERIC_DMA_COHERENCE_H */