]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit8548f1709fee6eb901f05928011d9d3c6924b844
tree2124abb2038c31bec3857dadc616e333c1985707
parentb60420d08f916bb7650216de5a213647bf4d7ff2
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