diff options
Diffstat (limited to 'arch/arm/mm/proc-xscale.S')
-rw-r--r-- | arch/arm/mm/proc-xscale.S | 49 |
1 files changed, 43 insertions, 6 deletions
diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S index 93df47265f2d..63037e2162f2 100644 --- a/arch/arm/mm/proc-xscale.S +++ b/arch/arm/mm/proc-xscale.S | |||
@@ -315,7 +315,7 @@ ENTRY(xscale_flush_kern_dcache_area) | |||
315 | * - start - virtual start address | 315 | * - start - virtual start address |
316 | * - end - virtual end address | 316 | * - end - virtual end address |
317 | */ | 317 | */ |
318 | ENTRY(xscale_dma_inv_range) | 318 | xscale_dma_inv_range: |
319 | tst r0, #CACHELINESIZE - 1 | 319 | tst r0, #CACHELINESIZE - 1 |
320 | bic r0, r0, #CACHELINESIZE - 1 | 320 | bic r0, r0, #CACHELINESIZE - 1 |
321 | mcrne p15, 0, r0, c7, c10, 1 @ clean D entry | 321 | mcrne p15, 0, r0, c7, c10, 1 @ clean D entry |
@@ -336,7 +336,7 @@ ENTRY(xscale_dma_inv_range) | |||
336 | * - start - virtual start address | 336 | * - start - virtual start address |
337 | * - end - virtual end address | 337 | * - end - virtual end address |
338 | */ | 338 | */ |
339 | ENTRY(xscale_dma_clean_range) | 339 | xscale_dma_clean_range: |
340 | bic r0, r0, #CACHELINESIZE - 1 | 340 | bic r0, r0, #CACHELINESIZE - 1 |
341 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry | 341 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry |
342 | add r0, r0, #CACHELINESIZE | 342 | add r0, r0, #CACHELINESIZE |
@@ -363,6 +363,43 @@ ENTRY(xscale_dma_flush_range) | |||
363 | mcr p15, 0, r0, c7, c10, 4 @ Drain Write (& Fill) Buffer | 363 | mcr p15, 0, r0, c7, c10, 4 @ Drain Write (& Fill) Buffer |
364 | mov pc, lr | 364 | mov pc, lr |
365 | 365 | ||
366 | /* | ||
367 | * dma_map_area(start, size, dir) | ||
368 | * - start - kernel virtual start address | ||
369 | * - size - size of region | ||
370 | * - dir - DMA direction | ||
371 | */ | ||
372 | ENTRY(xscale_dma_map_area) | ||
373 | add r1, r1, r0 | ||
374 | cmp r2, #DMA_TO_DEVICE | ||
375 | beq xscale_dma_clean_range | ||
376 | bcs xscale_dma_inv_range | ||
377 | b xscale_dma_flush_range | ||
378 | ENDPROC(xscale_dma_map_area) | ||
379 | |||
380 | /* | ||
381 | * dma_map_area(start, size, dir) | ||
382 | * - start - kernel virtual start address | ||
383 | * - size - size of region | ||
384 | * - dir - DMA direction | ||
385 | */ | ||
386 | ENTRY(xscale_dma_a0_map_area) | ||
387 | add r1, r1, r0 | ||
388 | teq r2, #DMA_TO_DEVICE | ||
389 | beq xscale_dma_clean_range | ||
390 | b xscale_dma_flush_range | ||
391 | ENDPROC(xscsale_dma_a0_map_area) | ||
392 | |||
393 | /* | ||
394 | * dma_unmap_area(start, size, dir) | ||
395 | * - start - kernel virtual start address | ||
396 | * - size - size of region | ||
397 | * - dir - DMA direction | ||
398 | */ | ||
399 | ENTRY(xscale_dma_unmap_area) | ||
400 | mov pc, lr | ||
401 | ENDPROC(xscale_dma_unmap_area) | ||
402 | |||
366 | ENTRY(xscale_cache_fns) | 403 | ENTRY(xscale_cache_fns) |
367 | .long xscale_flush_kern_cache_all | 404 | .long xscale_flush_kern_cache_all |
368 | .long xscale_flush_user_cache_all | 405 | .long xscale_flush_user_cache_all |
@@ -370,8 +407,8 @@ ENTRY(xscale_cache_fns) | |||
370 | .long xscale_coherent_kern_range | 407 | .long xscale_coherent_kern_range |
371 | .long xscale_coherent_user_range | 408 | .long xscale_coherent_user_range |
372 | .long xscale_flush_kern_dcache_area | 409 | .long xscale_flush_kern_dcache_area |
373 | .long xscale_dma_inv_range | 410 | .long xscale_dma_map_area |
374 | .long xscale_dma_clean_range | 411 | .long xscale_dma_unmap_area |
375 | .long xscale_dma_flush_range | 412 | .long xscale_dma_flush_range |
376 | 413 | ||
377 | /* | 414 | /* |
@@ -394,8 +431,8 @@ ENTRY(xscale_80200_A0_A1_cache_fns) | |||
394 | .long xscale_coherent_kern_range | 431 | .long xscale_coherent_kern_range |
395 | .long xscale_coherent_user_range | 432 | .long xscale_coherent_user_range |
396 | .long xscale_flush_kern_dcache_area | 433 | .long xscale_flush_kern_dcache_area |
397 | .long xscale_dma_flush_range | 434 | .long xscale_dma_a0_map_area |
398 | .long xscale_dma_clean_range | 435 | .long xscale_dma_unmap_area |
399 | .long xscale_dma_flush_range | 436 | .long xscale_dma_flush_range |
400 | 437 | ||
401 | ENTRY(cpu_xscale_dcache_clean_area) | 438 | ENTRY(cpu_xscale_dcache_clean_area) |