[RFC] Add DMA RX support for sunxi nand

Boris Brezillon boris.brezillon at free-electrons.com
Sun Jun 14 01:51:59 PDT 2015


Hi Roy,

Adding Richard in CC since he was part of the discussion we had on #mtd
about DMA and UBI/UBIFS. 

On Fri, 12 Jun 2015 13:38:47 +0200
Roy Spliet <r.spliet at ultimaker.com> wrote:

> Following are two patches for sunxi nand DMA support. There's a whole phletora
> of reasons why these are marked RFC, including:
> - Sunxi DMA support still needs to be merged upstream
> - Sun7i NAND definitions are not merged upstream
> - No TX support
> - Bounce buffer size is fixed to 8KB, and I have no idea whether this is sane

Here is a patch [1] which should help in creating an sg_table from a
buffer (even if this buffer was allocated with vmalloc), and thus
avoid using this bounce buffer when possible.
I also patched the GPMI driver [2] to use these helpers functions
instead of manually testing the buffer validity.

This is still an early version (note that it hasn't been tested yet),
but IMHO, we should add some consistency in all those NAND drivers which
are pretty much all doing the same kind of tests (when they are not
doing it wrong).

Best Regards,

Boris

[1]http://code.bulix.org/jl997t-88538
[2]http://code.bulix.org/sexjf4-88539

-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com



More information about the linux-mtd mailing list