]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: nand: allow drivers to request minimum alignment for passed buffer
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 30 Mar 2017 08:15:05 +0000 (17:15 +0900)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 25 Apr 2017 12:18:38 +0000 (14:18 +0200)
commitb48177715aaf9b272764ab0809eed943b6197d13
treee9a1cdeaaa0862bd8d64483b14c0883357766a48
parent9d54ed7cbf807e054acc66c7a633eb4c0c3aadb9
mtd: nand: allow drivers to request minimum alignment for passed buffer

In some cases, nand_do_{read,write}_ops is passed with unaligned
ops->datbuf.  Drivers using DMA will be unhappy about unaligned
buffer.

The new struct member, buf_align, represents the minimum alignment
the driver require for the buffer.  If the buffer passed from the
upper MTD layer does not have enough alignment, nand_do_*_ops will
use bufpoi.

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
include/linux/mtd/nand.h