mtd: nand: allow drivers to request minimum alignment for passed buffer
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 21 Nov 2017 17:38:27 +0000 (02:38 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 28 Nov 2017 15:28:59 +0000 (00:28 +0900)
commit436fb2b84dc24853298f1768c596f7ee02d582d7
tree0d063673734ad1c958df0df91c5d0f03dea17371
parentc7c553f249f99ae282f1fa5c0e314aae0bce8a26
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>
[Linux commit: 477544c62a84d3bacd9f90ba75ffc16c04d78071]
drivers/mtd/nand/nand_base.c
include/linux/mtd/nand.h