[lkml]   [2012]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH/RFC] dmaengine: add a slave parameter to __dma_request_channel()
    On Wed, Mar 7, 2012 at 1:46 PM, Russell King - ARM Linux
    <> wrote:

    > The call to dmaengine_slave_config() actually simplifies the DMA engine
    > support for some drivers though, so eliminating it doesn't help.  What
    > would be useful is to have a helper function along these lines:
    > struct dma_chan *dma_request_channel_config(mask, fn, data, config)
    > {
    >        struct dma_chan *c = dma_request_channel(mask, fn, data);
    >        if (c) {
    >                if (dmaengine_slave_config(c, config)) {
    >                        dma_release_channel(c);
    >                        c = NULL;
    >                }
    >        }
    >        return c;
    > }
    > which would simplify some of the DMA engine users.

    Yes that will cut down some overhead from some drivers.

    > There'll still be
    > some though which would want to call dmaengine_slave_config() to change
    > the channels configuration when the mode of the device switches.

    > Cannot dmaengine_slave_config() be used for that?

    It is already used for that.

    The PL022 SPI driver does this using different word sizes on the wire,
    so if the same controller talks to chips with different word width
    it reconfigures the size of unit picked from memory. Basically
    the width (not depth) of the FIFO is adjustable run-time.
    The words have to be fetched from memory with the same

    Linus Walleij
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2012-03-07 17:33    [W:0.022 / U:5.556 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site