]> git.baikalelectronics.ru Git - uboot.git/commit
MTD: mxs_nand_spl: Redo the way nand_init initializes
authorAdam Ford <aford173@gmail.com>
Mon, 18 Feb 2019 23:58:17 +0000 (17:58 -0600)
committerStefano Babic <sbabic@denx.de>
Wed, 13 Mar 2019 08:14:35 +0000 (09:14 +0100)
commitca87578e26cfb002a8565ad6c96485a9e4c74e73
tree493cc9c0e3f9d8da050893d777aee97ccf6f0c30
parentfe5dadd5c9740d2e29b28b926c32ef25784bb198
MTD: mxs_nand_spl: Redo the way nand_init initializes

Currently the spl system calls nand_init which does nothing.
It isn't until an attempt to load from NAND that it gets initialized.
Subsequent attempts to load just skip the initialization  because
NAND is already initialized.

This moves the contents of mxs_nand_init to nand_init.  In the event
of an error, it clears the number of nand chips found.  Any
attempts to use nand will check if there are nand chips available
instead of actually doing the initialization at that time. If there
are none, it will return an error to the higher level calls.

Signed-off-by: Adam Ford <aford173@gmail.com>
drivers/mtd/nand/raw/mxs_nand_spl.c