mtd: nand: use read_oob() instead of cmdfunc() for bad block check
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 22 Mar 2017 20:07:01 +0000 (05:07 +0900)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Fri, 24 Mar 2017 08:47:43 +0000 (09:47 +0100)
commitc120e75e0e7deff88119376298342df139b9b17c
tree2124abb2038c31bec3857dadc616e333c1985707
parent9fe4b66efb77fec71a9c11de58e5e51c5c826190
mtd: nand: use read_oob() instead of cmdfunc() for bad block check

The nand_default_block_markbad() and scan_block_fast() use high
level APIs to get access to the BBM.

On the other hand, nand_block_bad (the default implementation of
->block_bad) calls the lower level ->cmdfunc hook.  This prevents
drivers from using ->ecc.read_oob() even if optimized read operation
is implemented.  Besides, some NAND controllers may protect the BBM
with ECC.

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