diff options
Diffstat (limited to 'Documentation/DMA-API.txt')
-rw-r--r-- | Documentation/DMA-API.txt | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt index 2ffb0d62f0fe..805db4b2cba6 100644 --- a/Documentation/DMA-API.txt +++ b/Documentation/DMA-API.txt | |||
@@ -77,7 +77,7 @@ To get this part of the dma_ API, you must #include <linux/dmapool.h> | |||
77 | Many drivers need lots of small dma-coherent memory regions for DMA | 77 | Many drivers need lots of small dma-coherent memory regions for DMA |
78 | descriptors or I/O buffers. Rather than allocating in units of a page | 78 | descriptors or I/O buffers. Rather than allocating in units of a page |
79 | or more using dma_alloc_coherent(), you can use DMA pools. These work | 79 | or more using dma_alloc_coherent(), you can use DMA pools. These work |
80 | much like a kmem_cache_t, except that they use the dma-coherent allocator | 80 | much like a struct kmem_cache, except that they use the dma-coherent allocator |
81 | not __get_free_pages(). Also, they understand common hardware constraints | 81 | not __get_free_pages(). Also, they understand common hardware constraints |
82 | for alignment, like queue heads needing to be aligned on N byte boundaries. | 82 | for alignment, like queue heads needing to be aligned on N byte boundaries. |
83 | 83 | ||
@@ -94,7 +94,7 @@ The pool create() routines initialize a pool of dma-coherent buffers | |||
94 | for use with a given device. It must be called in a context which | 94 | for use with a given device. It must be called in a context which |
95 | can sleep. | 95 | can sleep. |
96 | 96 | ||
97 | The "name" is for diagnostics (like a kmem_cache_t name); dev and size | 97 | The "name" is for diagnostics (like a struct kmem_cache name); dev and size |
98 | are like what you'd pass to dma_alloc_coherent(). The device's hardware | 98 | are like what you'd pass to dma_alloc_coherent(). The device's hardware |
99 | alignment requirement for this type of data is "align" (which is expressed | 99 | alignment requirement for this type of data is "align" (which is expressed |
100 | in bytes, and must be a power of two). If your device has no boundary | 100 | in bytes, and must be a power of two). If your device has no boundary |
@@ -431,10 +431,10 @@ be identical to those passed in (and returned by | |||
431 | dma_alloc_noncoherent()). | 431 | dma_alloc_noncoherent()). |
432 | 432 | ||
433 | int | 433 | int |
434 | dma_is_consistent(dma_addr_t dma_handle) | 434 | dma_is_consistent(struct device *dev, dma_addr_t dma_handle) |
435 | 435 | ||
436 | returns true if the memory pointed to by the dma_handle is actually | 436 | returns true if the device dev is performing consistent DMA on the memory |
437 | consistent. | 437 | area pointed to by the dma_handle. |
438 | 438 | ||
439 | int | 439 | int |
440 | dma_get_cache_alignment(void) | 440 | dma_get_cache_alignment(void) |
@@ -459,7 +459,7 @@ anything like this. You must also be extra careful about accessing | |||
459 | memory you intend to sync partially. | 459 | memory you intend to sync partially. |
460 | 460 | ||
461 | void | 461 | void |
462 | dma_cache_sync(void *vaddr, size_t size, | 462 | dma_cache_sync(struct device *dev, void *vaddr, size_t size, |
463 | enum dma_data_direction direction) | 463 | enum dma_data_direction direction) |
464 | 464 | ||
465 | Do a partial sync of memory that was allocated by | 465 | Do a partial sync of memory that was allocated by |
@@ -489,7 +489,7 @@ size is the size of the area (must be multiples of PAGE_SIZE). | |||
489 | flags can be or'd together and are | 489 | flags can be or'd together and are |
490 | 490 | ||
491 | DMA_MEMORY_MAP - request that the memory returned from | 491 | DMA_MEMORY_MAP - request that the memory returned from |
492 | dma_alloc_coherent() be directly writeable. | 492 | dma_alloc_coherent() be directly writable. |
493 | 493 | ||
494 | DMA_MEMORY_IO - request that the memory returned from | 494 | DMA_MEMORY_IO - request that the memory returned from |
495 | dma_alloc_coherent() be addressable using read/write/memcpy_toio etc. | 495 | dma_alloc_coherent() be addressable using read/write/memcpy_toio etc. |