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)
committerHans de Goede <hdegoede@redhat.com>
Mon, 31 Aug 2015 06:43:42 +0000 (08:43 +0200)
commit24a06c964fd457238f16531d8ed1b660c4341676
tree687cfa39f76cca626093faee785aa1004a755299
parent2b8a01a99d6b1632d4356fa71383069b4a532687
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