[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdYiLw3577oGwgtM81ROwR6spzaxxY9O+tv99UJs8ZZ8Vw@mail.gmail.com>
Date: Wed, 7 Mar 2012 17:31:45 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Russell King - ARM Linux <linux@....linux.org.uk>,
Guennadi Liakhovetski <g.liakhovetski@....de>
Cc: Vinod Koul <vinod.koul@...el.com>, linux-kernel@...r.kernel.org,
Jassi Brar <jassisinghbrar@...il.com>,
Magnus Damm <magnus.damm@...il.com>,
Paul Mundt <lethal@...ux-sh.org>
Subject: Re: [PATCH/RFC] dmaengine: add a slave parameter to __dma_request_channel()
On Wed, Mar 7, 2012 at 1:46 PM, Russell King - ARM Linux
<linux@....linux.org.uk> 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.
[Russell]
> 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.
[Guennadi]
> 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
width.
drivers/spi/amba-pl022.c
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists