[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140822005030.GR24407@sirena.org.uk>
Date: Thu, 21 Aug 2014 19:50:30 -0500
From: Mark Brown <broonie@...nel.org>
To: Robin Gong <b38343@...escale.com>
Cc: linux-arm-kernel@...ts.infradead.org, linux-spi@...r.kernel.org,
linux-kernel@...r.kernel.org, Frank.Li@...escale.com,
shawn.guo@...aro.org, marex@...x.de
Subject: Re: [PATCH v3] spi: spi-imx: add DMA support
On Thu, Aug 21, 2014 at 11:53:10AM +0800, Robin Gong wrote:
> Change from v2:
> http://thread.gmane.org/gmane.linux.ports.arm.kernel/291722/focus=294363
> 1. dma setup only for imx51-ecspi
> 2. use one small dummy buffer(1 bd size) to templiy store data
> for meanless rx/tx, instead of malloc the actual transfer size.
You can use the must_tx and must_rx flags to use the core implementation
of this functionality. This will mean you get any performance or other
improvements we implement there.
> + int (*txrx_bufs)(struct spi_device *spi, struct spi_transfer *t);
> + struct dma_chan *dma_chan_rx;
> + struct dma_chan *dma_chan_tx;
The SPI controller has variables for this already - you should use them
(and the core support). In general my main comment on this patch is
that you should be using the core DMA support, it fixes some problems
(like not having mapping for vmalloc() buffers) and factors out some
code.
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists