On Fri, Sep 19, 2008 at 7:34 AM, Timur Tabi <timur@freescale.com> wrote:
I think its a good idea especially since it would be best not to
needlessly proliferate client implementations with competing channel
allocation schemes. However it would need to be more descriptive
than:
struct dma_chan *dma_request_channel(dma_cap_mask_t request_mask);
Why:
1/ What if the requester initializes before a dmaengine device has
been registered? What if a device is never registered?
2/ What about platform specific concerns where dma_cap_mask_t is not
descriptive enough e.g. only one memcpy channel can address a certain
bus? Currently a client implementation can have some intelligence to
return DMA_DUP for channels that do not have the platform capability.
At the very least clients should be allowed to set an 'exclusive' bit
to prevent the channel from leaking elsewhere.
--
Dan
--