mtd: nand: introduce NAND_ROW_ADDR_3 flag
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 13 Sep 2017 02:05:50 +0000 (11:05 +0900)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Mon, 18 Sep 2017 12:55:52 +0000 (14:55 +0200)
commit14157f861437ebe2d624b0a845b91bbdf8ca9a2d
treeee3b430a97c0516cd92455525419a3edc3db25d5
parent882fd1577cbe7812ae3a48988180c5f0fda475ca
mtd: nand: introduce NAND_ROW_ADDR_3 flag

Several drivers check ->chipsize to see if the third row address cycle
is needed.  Instead of embedding magic sizes such as 32MB, 128MB in
drivers, introduce a new flag NAND_ROW_ADDR_3 for clean-up.  Since
nand_scan_ident() knows well about the device, it can handle this
properly.  The flag is set if the row address bit width is greater
than 16.

Delete comments such as "One more address cycle for ..." because
intention is now clear enough from the code.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Wenyou Yang <wenyou.yang@microchip.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/atmel/nand-controller.c
drivers/mtd/nand/au1550nd.c
drivers/mtd/nand/diskonchip.c
drivers/mtd/nand/hisi504_nand.c
drivers/mtd/nand/mxc_nand.c
drivers/mtd/nand/nand_base.c
drivers/mtd/nand/nuc900_nand.c
include/linux/mtd/rawnand.h