sunxi_nand_spl: Add support for backup boot partitions
authorHans de Goede <hdegoede@redhat.com>
Sat, 15 Aug 2015 19:51:33 +0000 (21:51 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 10:19:14 +0000 (12:19 +0200)
commita75638485ccd2bc78b07352e53844c4041bd9f95
tree7268a3820804f61d5f693ded3b0654f265c8a844
parent6178d2ad47ff7b7b5bf5dabb437f9186d5b7f7d3
sunxi_nand_spl: Add support for backup boot partitions

The BROM does not care / use bad page markings, instead it deals with
any bad pages in the first erase-block by simply trying to load "boot0"
from the next erase-block.

This commit implements the same strategy for the sunxi spl nand code,
allowing it to boot from the backup boot partition when the main boot
partition is bad (tested by erasing the main boot partition).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
drivers/mtd/nand/sunxi_nand_spl.c