aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mm/cache-v7.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mm/cache-v7.S')
-rw-r--r--arch/arm/mm/cache-v7.S10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S
index b1cd0fd9120..bcd64f26587 100644
--- a/arch/arm/mm/cache-v7.S
+++ b/arch/arm/mm/cache-v7.S
@@ -279,10 +279,9 @@ ENDPROC(v7_dma_flush_range)
*/
ENTRY(v7_dma_map_area)
add r1, r1, r0
- cmp r2, #DMA_TO_DEVICE
- beq v7_dma_clean_range
- bcs v7_dma_inv_range
- b v7_dma_flush_range
+ teq r2, #DMA_FROM_DEVICE
+ beq v7_dma_inv_range
+ b v7_dma_clean_range
ENDPROC(v7_dma_map_area)
/*
@@ -292,6 +291,9 @@ ENDPROC(v7_dma_map_area)
* - dir - DMA direction
*/
ENTRY(v7_dma_unmap_area)
+ add r1, r1, r0
+ teq r2, #DMA_TO_DEVICE
+ bne v7_dma_inv_range
mov pc, lr
ENDPROC(v7_dma_unmap_area)