dma.h 871 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef DMA_H
  2. #define DMA_H
  3. #include <asm/glue-cache.h>
  4. #ifndef MULTI_CACHE
  5. #define dmac_map_area __glue(_CACHE,_dma_map_area)
  6. #define dmac_unmap_area __glue(_CACHE,_dma_unmap_area)
  7. /*
  8. * These are private to the dma-mapping API. Do not use directly.
  9. * Their sole purpose is to ensure that data held in the cache
  10. * is visible to DMA, or data written by DMA to system memory is
  11. * visible to the CPU.
  12. */
  13. extern void dmac_map_area(const void *, size_t, int);
  14. extern void dmac_unmap_area(const void *, size_t, int);
  15. #else
  16. /*
  17. * These are private to the dma-mapping API. Do not use directly.
  18. * Their sole purpose is to ensure that data held in the cache
  19. * is visible to DMA, or data written by DMA to system memory is
  20. * visible to the CPU.
  21. */
  22. #define dmac_map_area cpu_cache.dma_map_area
  23. #define dmac_unmap_area cpu_cache.dma_unmap_area
  24. #endif
  25. #endif