Merge tag 'tee-optee-for-5.2' of http://git.linaro.org:/people/jens.wiklander/linux...
[sfrench/cifs-2.6.git] / Documentation / DMA-API.txt
index 607c1e75e5aa03d64f6b2a936920f176bc222603..0076150fdccbbc1276047f39ff5496edc93b492a 100644 (file)
@@ -195,6 +195,14 @@ Requesting the required mask does not alter the current mask.  If you
 wish to take advantage of it, you should issue a dma_set_mask()
 call to set the mask to the value returned.
 
+::
+
+       size_t
+       dma_direct_max_mapping_size(struct device *dev);
+
+Returns the maximum size of a mapping for the device. The size parameter
+of the mapping functions like dma_map_single(), dma_map_page() and
+others should not be larger than the returned value.
 
 Part Id - Streaming DMA mappings
 --------------------------------
@@ -566,8 +574,7 @@ boundaries when doing this.
 
        int
        dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr,
-                                   dma_addr_t device_addr, size_t size, int
-                                   flags)
+                                   dma_addr_t device_addr, size_t size);
 
 Declare region of memory to be handed out by dma_alloc_coherent() when
 it's asked for coherent memory for this device.
@@ -581,12 +588,6 @@ dma_addr_t in dma_alloc_coherent()).
 
 size is the size of the area (must be multiples of PAGE_SIZE).
 
-flags can be ORed together and are:
-
-- DMA_MEMORY_EXCLUSIVE - only allocate memory from the declared regions.
-  Do not allow dma_alloc_coherent() to fall back to system memory when
-  it's out of memory in the declared region.
-
 As a simplification for the platforms, only *one* such region of
 memory may be declared per device.
 
@@ -605,23 +606,6 @@ unconditionally having removed all the required structures.  It is the
 driver's job to ensure that no parts of this memory region are
 currently in use.
 
-::
-
-       void *
-       dma_mark_declared_memory_occupied(struct device *dev,
-                                         dma_addr_t device_addr, size_t size)
-
-This is used to occupy specific regions of the declared space
-(dma_alloc_coherent() will hand out the first free region it finds).
-
-device_addr is the *device* address of the region requested.
-
-size is the size (and should be a page-sized multiple).
-
-The return value will be either a pointer to the processor virtual
-address of the memory, or an error (via PTR_ERR()) if any part of the
-region is occupied.
-
 Part III - Debug drivers use of the DMA-API
 -------------------------------------------
 
@@ -696,6 +680,9 @@ dma-api/disabled            This read-only file contains the character 'Y'
                                happen when it runs out of memory or if it was
                                disabled at boot time
 
+dma-api/dump                   This read-only file contains current DMA
+                               mappings.
+
 dma-api/error_count            This file is read-only and shows the total
                                numbers of errors found.