mtd: nand: add common DT init code
authorBrian Norris <computersforpeace@gmail.com>
Wed, 15 Jun 2016 19:09:22 +0000 (21:09 +0200)
committerScott Wood <oss@buserror.net>
Mon, 25 Jul 2016 01:36:28 +0000 (20:36 -0500)
commit42bd19ce6c7bffef402ad6dd639c33686f485d29
treeda265b8e0a026892f7ffeef27306ee58b232a4ca
parent8df375b445c506f61722e20379ce645ce133e5de
mtd: nand: add common DT init code

These are already-documented common bindings for NAND chips. Let's
handle them in nand_base.

If NAND controller drivers need to act on this data before bringing up
the NAND chip (e.g., fill out ECC callback functions, change HW modes,
etc.), then they can do so between calling nand_scan_ident() and
nand_scan_tail().

The original commit has been slightly reworked to use the fdtdec_xxx()
helpers (instead of the of_xxxx() ones).

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
drivers/mtd/nand/nand_base.c
include/linux/mtd/nand.h