[U-Boot] [PATCH v3] common: env_nand: Ensure that we have nand_info[0] prior to use
Scott Wood
oss at buserror.net
Mon Aug 15 19:13:33 CEST 2016
On Mon, 2016-08-15 at 13:02 -0400, Tom Rini wrote:
> Now that nand_info[] is an array of pointers we need to ensure that it's
> been populated prior to use. We may for example have ENV in NAND set in
> configurations that run on boards with and without NAND (where default
> env is fine enough, such as omap3_beagle and beagleboard (NAND) vs
> beagle xM (no NAND)).
>
> Fixes: b616d9b0a708 ("nand: Embed mtd_info in struct nand_chip")
> Cc: Scott Wood <oss at buserror.net>
> Signed-off-by: Tom Rini <trini at konsulko.com>
> ---
> Changes in v3:
> - Don't overload the blocksize check in readenv(), and now that
> blocksize would never be zero (this was the previous way to see that
> we had no NAND detected), remove that check.
> - Address the CONFIG_ENV_OFFSET_OOB case in env_relocate_spec() as this
> too would fail now if no NAND was detected.
>
> Changes in v2:
> - Oops, move check on the saveenv side in to erase_and_write_env
> ---
> common/env_nand.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
Acked-by: Scott Wood <oss at buserror.net>
-Scott
More information about the U-Boot
mailing list