]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-sh64/dma-mapping.h
[ARM] 4751/1: [AT91] ISI peripheral on SAM9263
[linux-2.6-omap-h63xx.git] / include / asm-sh64 / dma-mapping.h
index 1438b763a5ea64b2741d534415d4c5257cbaa05e..18f8dd642ac5282c263de65bf6020f545468bffa 100644 (file)
@@ -42,8 +42,9 @@ static inline void dma_free_coherent(struct device *dev, size_t size,
 static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
                                  enum dma_data_direction dir)
 {
-       unsigned long s = (unsigned long) vaddr & L1_CACHE_ALIGN_MASK;
-       unsigned long e = (vaddr + size) & L1_CACHE_ALIGN_MASK;
+       unsigned long start = (unsigned long) vaddr;
+       unsigned long s = start & L1_CACHE_ALIGN_MASK;
+       unsigned long e = (start + size) & L1_CACHE_ALIGN_MASK;
 
        for (; s <= e; s += L1_CACHE_BYTES)
                asm volatile ("ocbp     %0, 0" : : "r" (s));