dma-mapping.c (4af9027d3f4061992c0b065102a0a666b72f073b) | dma-mapping.c (ae76f635d4e1cffa6870cc5472567ca9d6940a22) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd. 3 4#include <linux/cache.h> 5#include <linux/dma-mapping.h> 6#include <linux/dma-contiguous.h> 7#include <linux/dma-noncoherent.h> 8#include <linux/genalloc.h> --- 71 unchanged lines hidden (view full) --- 80 } 81} 82 83void arch_sync_dma_for_cpu(struct device *dev, phys_addr_t paddr, 84 size_t size, enum dma_data_direction dir) 85{ 86 switch (dir) { 87 case DMA_TO_DEVICE: | 1// SPDX-License-Identifier: GPL-2.0 2// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd. 3 4#include <linux/cache.h> 5#include <linux/dma-mapping.h> 6#include <linux/dma-contiguous.h> 7#include <linux/dma-noncoherent.h> 8#include <linux/genalloc.h> --- 71 unchanged lines hidden (view full) --- 80 } 81} 82 83void arch_sync_dma_for_cpu(struct device *dev, phys_addr_t paddr, 84 size_t size, enum dma_data_direction dir) 85{ 86 switch (dir) { 87 case DMA_TO_DEVICE: |
88 cache_op(paddr, size, dma_wb_range); 89 break; | 88 return; |
90 case DMA_FROM_DEVICE: 91 case DMA_BIDIRECTIONAL: | 89 case DMA_FROM_DEVICE: 90 case DMA_BIDIRECTIONAL: |
92 cache_op(paddr, size, dma_wbinv_range); | 91 cache_op(paddr, size, dma_inv_range); |
93 break; 94 default: 95 BUG(); 96 } 97} | 92 break; 93 default: 94 BUG(); 95 } 96} |