aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/DMA-API.txt42
1 files changed, 42 insertions, 0 deletions
diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt
index bb0e75e368b2..c8db3d0dba50 100644
--- a/Documentation/DMA-API.txt
+++ b/Documentation/DMA-API.txt
@@ -364,6 +364,48 @@ API.
364Note: <nents> must be the number you passed in, *not* the number of 364Note: <nents> must be the number you passed in, *not* the number of
365physical entries returned. 365physical entries returned.
366 366
367void
368dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size,
369 enum dma_data_direction direction)
370void
371pci_dma_sync_single_for_cpu(struct pci_dev *hwdev, dma_addr_t dma_handle,
372 size_t size, int direction)
373void
374dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size,
375 enum dma_data_direction direction)
376void
377pci_dma_sync_single_for_device(struct pci_dev *hwdev, dma_addr_t dma_handle,
378 size_t size, int direction)
379void
380dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
381 enum dma_data_direction direction)
382void
383pci_dma_sync_sg_for_cpu(struct pci_dev *hwdev, struct scatterlist *sg,
384 int nelems, int direction)
385void
386dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems,
387 enum dma_data_direction direction)
388void
389pci_dma_sync_sg_for_device(struct pci_dev *hwdev, struct scatterlist *sg,
390 int nelems, int direction)
391
392Synchronise a single contiguous or scatter/gather mapping for the cpu
393and device. With the sync_sg API, all the parameters must be the same
394as those passed into the single mapping API. With the sync_single API,
395you can use dma_handle and size parameters that aren't identical to
396those passed into the single mapping API to do a partial sync.
397
398Notes: You must do this:
399
400- Before reading values that have been written by DMA from the device
401 (use the DMA_FROM_DEVICE direction)
402- After writing values that will be written to the device using DMA
403 (use the DMA_TO_DEVICE) direction
404- before *and* after handing memory to the device if the memory is
405 DMA_BIDIRECTIONAL
406
407See also dma_map_single().
408
367dma_addr_t 409dma_addr_t
368dma_map_single_attrs(struct device *dev, void *cpu_addr, size_t size, 410dma_map_single_attrs(struct device *dev, void *cpu_addr, size_t size,
369 enum dma_data_direction dir, 411 enum dma_data_direction dir,