Skip to contentSkip to conversation

MTD: mxs_nand_spl: Redo the way nand_init initializes

PATCH New sbabic at denx.de 1 participant 1 message Mar 13, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 33/34 MTD: mxs_nand_spl: Redo the way nand_init initializes

Quoted 10 lines

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.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================