[PATCH 18/18] fsmc/nand: Add DMA support
Linus Walleij
linus.walleij at linaro.org
Wed Mar 7 11:09:59 EST 2012
On Wed, Mar 7, 2012 at 12:31 PM, Vipin Kumar <vipin.kumar at st.com> wrote:
> The fsmc_nand driver uses cpu to read/write onto the device. This is inefficient
> because of two reasons
> - the cpu gets locked on AHB bus while reading from NAND
> - the cpu is unnecessarily used when dma can do the job
>
> This patch adds the support for accessing the device through DMA
Please elaborate a bit on how this is done, because I think it's new
stuff.
It appears that the FSMC is not like a slave device, i.e. not taking a
stream of bytes. Instead you use the memcpy() portions of the
dmaengine API to move data in/out of the flash pages to the
page currently handled by the controller.
Is this correct? I think it's pretty interesting since it's a new usecase
for in-kernel memcpy() which (AFAIK) has so far only been used
to accelerate network packet copying (correct me if wrong!).
Please add Dan Williams and Vinod Koul to CC on this patch so
the dmaengine people get to look at it.
Yours,
Linus Walleij
More information about the linux-mtd
mailing list