aboutsummaryrefslogtreecommitdiffstats
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.S34
1 files changed, 30 insertions, 4 deletions
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S
index 9073db849fb4..bcd64f265870 100644
--- a/arch/arm/mm/cache-v7.S
+++ b/arch/arm/mm/cache-v7.S
@@ -216,7 +216,7 @@ ENDPROC(v7_flush_kern_dcache_area)
216 * - start - virtual start address of region 216 * - start - virtual start address of region
217 * - end - virtual end address of region 217 * - end - virtual end address of region
218 */ 218 */
219ENTRY(v7_dma_inv_range) 219v7_dma_inv_range:
220 dcache_line_size r2, r3 220 dcache_line_size r2, r3
221 sub r3, r2, #1 221 sub r3, r2, #1
222 tst r0, r3 222 tst r0, r3
@@ -240,7 +240,7 @@ ENDPROC(v7_dma_inv_range)
240 * - start - virtual start address of region 240 * - start - virtual start address of region
241 * - end - virtual end address of region 241 * - end - virtual end address of region
242 */ 242 */
243ENTRY(v7_dma_clean_range) 243v7_dma_clean_range:
244 dcache_line_size r2, r3 244 dcache_line_size r2, r3
245 sub r3, r2, #1 245 sub r3, r2, #1
246 bic r0, r0, r3 246 bic r0, r0, r3
@@ -271,6 +271,32 @@ ENTRY(v7_dma_flush_range)
271 mov pc, lr 271 mov pc, lr
272ENDPROC(v7_dma_flush_range) 272ENDPROC(v7_dma_flush_range)
273 273
274/*
275 * dma_map_area(start, size, dir)
276 * - start - kernel virtual start address
277 * - size - size of region
278 * - dir - DMA direction
279 */
280ENTRY(v7_dma_map_area)
281 add r1, r1, r0
282 teq r2, #DMA_FROM_DEVICE
283 beq v7_dma_inv_range
284 b v7_dma_clean_range
285ENDPROC(v7_dma_map_area)
286
287/*
288 * dma_unmap_area(start, size, dir)
289 * - start - kernel virtual start address
290 * - size - size of region
291 * - dir - DMA direction
292 */
293ENTRY(v7_dma_unmap_area)
294 add r1, r1, r0
295 teq r2, #DMA_TO_DEVICE
296 bne v7_dma_inv_range
297 mov pc, lr
298ENDPROC(v7_dma_unmap_area)
299
274 __INITDATA 300 __INITDATA
275 301
276 .type v7_cache_fns, #object 302 .type v7_cache_fns, #object
@@ -281,7 +307,7 @@ ENTRY(v7_cache_fns)
281 .long v7_coherent_kern_range 307 .long v7_coherent_kern_range
282 .long v7_coherent_user_range 308 .long v7_coherent_user_range
283 .long v7_flush_kern_dcache_area 309 .long v7_flush_kern_dcache_area
284 .long v7_dma_inv_range 310 .long v7_dma_map_area
285 .long v7_dma_clean_range 311 .long v7_dma_unmap_area
286 .long v7_dma_flush_range 312 .long v7_dma_flush_range
287 .size v7_cache_fns, . - v7_cache_fns 313 .size v7_cache_fns, . - v7_cache_fns