[U-Boot] [PATCH] nand: force BBT scan for controllers which need it
Scott Wood
oss at buserror.net
Tue Nov 15 06:30:49 CET 2016
On Wed, 2016-10-26 at 17:18 -0700, Stefan Agner wrote:
> From: Stefan Agner <stefan.agner at toradex.com>
>
> Commit 35c204d8a9d0 ("nand: reinstate lazy bad block scanning")
> introduced lazy BBT scanning. However, some controller do parts
> of the initialization (mxs_nand.c) during scan_bbt, hence for
> those controllers the BBT must be scanned at initialization time.
>
> In most situation the U-Boot environment gets read first, and
> the U-Boot environment code checks for bad blocks first. Checking
> for bad blocks will ask for scan_bbt before reading the first page,
> hence in most situation the issue does not appear in practice.
> However, when there is no environment configured, other code might
> access NAND first which does not explicitly checks for bad blocks,
> in those cases ECC reads will fail always.
>
> Cc: Rostislav Lisovy <lisovy at gmail.com>
> Signed-off-by: Stefan Agner <stefan.agner at toradex.com>
> ---
> Not sure if this solution is a nice solution as we diverge more
> and more from the kernel...
Why does this init code need to run at the end of nand_scan_tail()? If it can
run in between nand_scan_ident() and nand_scan_tail(), then use
CONFIG_SYS_NAND_SELF_INIT to allow the driver to run its init at that time.
-Scott
More information about the U-Boot
mailing list