Files
twx-linux/include/linux
Dan Williams 59b5ec2144 dmaengine: introduce dma_request_channel and private channels
This interface is primarily for device-to-memory clients which need to
search for dma channels with platform-specific characteristics.  The
prototype is:

struct dma_chan *dma_request_channel(dma_cap_mask_t mask,
                                     dma_filter_fn filter_fn,
                                     void *filter_param);

When the optional 'filter_fn' parameter is set to NULL
dma_request_channel simply returns the first channel that satisfies the
capability mask.  Otherwise, when the mask parameter is insufficient for
specifying the necessary channel, the filter_fn routine can be used to
disposition the available channels in the system. The filter_fn routine
is called once for each free channel in the system.  Upon seeing a
suitable channel filter_fn returns DMA_ACK which flags that channel to
be the return value from dma_request_channel.  A channel allocated via
this interface is exclusive to the caller, until dma_release_channel()
is called.

To ensure that all channels are not consumed by the general-purpose
allocator the DMA_PRIVATE capability is provided to exclude a dma_device
from general-purpose (memory-to-memory) consideration.

Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2009-01-06 11:38:15 -07:00
..
…
…
…
…
…
…
…
…
…
…
…
2009-01-04 13:33:20 -08:00
…
2008-12-30 16:51:43 -05:00
…
…
…
…
…
…
…
…
…
2008-12-29 08:29:50 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-01-01 10:12:19 +10:30
…
2008-12-29 08:29:50 +01:00
…
2009-01-04 13:33:20 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-01-02 12:19:34 -08:00
…
2008-12-29 17:47:23 +10:00
…
…
…
…
…
…
…
…
2008-12-25 11:01:43 +11:00
…
…
…
…
…
2008-12-31 18:07:38 -05:00
…
…
…
…
…
…
…
…
…
…
…
2009-01-03 14:02:18 +01:00
…
2008-12-29 07:39:34 -05:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-01-04 13:33:20 -08:00
…
2009-01-04 13:33:20 -08:00
…
…
…
…
2008-12-29 11:27:46 +02:00
…
…
…
…
…
…
…
…
…
…
2008-12-31 18:07:42 -05:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2008-12-31 18:07:42 -05:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2008-12-31 15:11:46 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-01-03 14:11:07 +01:00
…
…
…
…
2008-12-28 22:43:21 -05:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-01-04 13:33:20 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2008-12-30 09:05:16 +10:30
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-01-01 10:12:25 +10:30
…
…
…
…
…
…
…
…
…
2009-01-02 10:19:36 -08:00
2008-12-29 08:29:51 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…