aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/asm-sh64/dma-mapping.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/asm-sh64/dma-mapping.h b/include/asm-sh64/dma-mapping.h
index 1438b763a5ea..18f8dd642ac5 100644
--- a/include/asm-sh64/dma-mapping.h
+++ b/include/asm-sh64/dma-mapping.h
@@ -42,8 +42,9 @@ static inline void dma_free_coherent(struct device *dev, size_t size,
42static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, 42static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
43 enum dma_data_direction dir) 43 enum dma_data_direction dir)
44{ 44{
45 unsigned long s = (unsigned long) vaddr & L1_CACHE_ALIGN_MASK; 45 unsigned long start = (unsigned long) vaddr;
46 unsigned long e = (vaddr + size) & L1_CACHE_ALIGN_MASK; 46 unsigned long s = start & L1_CACHE_ALIGN_MASK;
47 unsigned long e = (start + size) & L1_CACHE_ALIGN_MASK;
47 48
48 for (; s <= e; s += L1_CACHE_BYTES) 49 for (; s <= e; s += L1_CACHE_BYTES)
49 asm volatile ("ocbp %0, 0" : : "r" (s)); 50 asm volatile ("ocbp %0, 0" : : "r" (s));