mtd: nand: qcom: reorganize nand devices probing
authorAbhishek Sahu <absahu@codeaurora.org>
Wed, 19 Jul 2017 11:47:58 +0000 (17:17 +0530)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Wed, 23 Aug 2017 14:49:17 +0000 (16:49 +0200)
commit89f5127c4b0dcd847a2a0b5d0be37ca7366af9e5
treeaf7c754c0b03dd6790bef10281d60e4ae428cfa1
parenteb6df28ef63d0ac9d8bb86483d8840fa95da4a8b
mtd: nand: qcom: reorganize nand devices probing

The NAND controller can support multiple NAND devices having different
page sizes. Future code will require us to allocate memory based on the
maximum number of codewords among all the devices. We reorganize the
NAND device probing such that the ONFI parameters are first read for
each connected device to identify the maximum number of codewords
possible, and only then proceed with MTD device registration (i.e, call
nand_scan_tail and mtd_device_register).

This is a reorganization of the existing code and will not change any
functionality.

Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/qcom_nandc.c