]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: nand: allocate aligned buffers if NAND_OWN_BUFFERS is unset
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 30 Mar 2017 08:15:04 +0000 (17:15 +0900)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 25 Apr 2017 12:18:37 +0000 (14:18 +0200)
commit9d54ed7cbf807e054acc66c7a633eb4c0c3aadb9
tree461a23ff5a0761e5940c3b6db229bd85f5dc1082
parenta8f8afda691fb758982c559b207f600a8d5c93db
mtd: nand: allocate aligned buffers if NAND_OWN_BUFFERS is unset

Some NAND controllers are using DMA engine requiring a specific
buffer alignment.  The core provides no guarantee on the nand_buffers
pointers, which forces some drivers to allocate their own buffers
and pass the NAND_OWN_BUFFERS flag.

Rework the nand_buffers allocation logic to allocate each buffer
independently.  This should make most NAND controllers/DMA engine
happy, and allow us to get rid of these custom buf allocation in
NAND controller drivers.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/nand_base.c