linux-stable/include/linux/mtd
Boris Brezillon 25f815f66a mtd: nand: force drivers to explicitly send READ/PROG commands
The core currently send the READ0 and SEQIN+PAGEPROG commands in
nand_do_read/write_ops(). This is inconsistent with
->read/write_oob[_raw]() hooks behavior which are expected to send
these commands.

There's already a flag (NAND_ECC_CUSTOM_PAGE_ACCESS) to inform the core
that a specific controller wants to send the READ/SEQIN+PAGEPROG
commands on its own, but it's an opt-in flag, and existing drivers are
unlikely to be updated to pass it.

Moreover, some controllers cannot dissociate the READ/PAGEPROG commands
from the associated data transfer and ECC engine activation, and
developers have to hack things in their ->cmdfunc() implementation to
handle such complex cases, or have to accept the perf penalty of sending
twice the same command.
To address this problem we are planning on adding a new interface which
is passed all information about a NAND operation (including the amount
of data to transfer) and replacing all calls to ->cmdfunc() to calls to
this new ->exec_op() hook. But, in order to do that, we need to have all
->cmdfunc() calls placed near their associated ->read/write_buf/byte()
calls.

Modify the core and relevant drivers to make NAND_ECC_CUSTOM_PAGE_ACCESS
the default case, and remove this flag.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[miquel.raynal@free-electrons.com: tested, fixed and rebased on nand/next]
Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-12-14 13:34:17 +01:00
..
bbm.h
blktrans.h
cfi.h
cfi_endian.h
concat.h
doc2000.h
flashchip.h
ftl.h
gen_probe.h
inftl.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
latch-addr-flash.h
lpc32xx_mlc.h
lpc32xx_slc.h
map.h
mtd.h mtd: remove the get_unmapped_area method 2017-11-13 21:39:18 +01:00
mtdram.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nand-gpio.h This pull request contains the following core changes: 2017-11-22 20:46:06 -10:00
nand_bch.h
nand_ecc.h
ndfc.h
nftl.h
onenand.h
onenand_regs.h
partitions.h mtd: partitions: add support for partition parsers 2017-06-22 13:13:09 -07:00
pfow.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
physmap.h
pismo.h
plat-ram.h
qinfo.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rawnand.h mtd: nand: force drivers to explicitly send READ/PROG commands 2017-12-14 13:34:17 +01:00
sh_flctl.h mtd: nand: Rename nand.h into rawnand.h 2017-08-13 10:11:49 +02:00
sharpsl.h Merge branch 'nand/rename-header-file' of git://git.infradead.org/l2-mtd into nand/next 2017-08-23 17:00:12 +02:00
spear_smi.h
spi-nor.h mtd: spi-nor: add spi_nor_init() function 2017-10-10 18:19:42 +02:00
super.h
ubi.h
xip.h mtd: only use __xipram annotation when XIP_KERNEL is set 2017-08-15 14:00:44 +02:00