From 85264d7f8ae55060fc75992a287301573d483f29 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Wed, 23 Jul 2014 10:03:51 +0200 Subject: colibri vf50/61: detect bad blocks in U-Boot area The boot ROM was not able to detect bad blocks in the U-Boot area due to disabled "bad block marking swap" functionality. The description of this field is a bit unclear, but tests show that skipping bad blocks in U-Boot area only work if this field is set to 0. --- arch/arm/imx-common/cmd_writebcb.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/imx-common/cmd_writebcb.c b/arch/arm/imx-common/cmd_writebcb.c index 9a7757d11a..e6fc125760 100644 --- a/arch/arm/imx-common/cmd_writebcb.c +++ b/arch/arm/imx-common/cmd_writebcb.c @@ -123,8 +123,11 @@ static void create_fcb(nand_info_t *nand, uint8_t *buf, int fw1_start_address, /* This is typically the first byte of the pages OOB area */ fcb->bb_marker_physical_offset = nand->writesize; - /* Disable swapping of bad block marker byte */ - fcb->disbbm = 1; + /* + * Enable swapping of bad block marker byte (required for boot ROM in + * order to detect factory marked bad blocks) + */ + fcb->disbbm = 0; fcb->disbbm_search = 0; fcb->disbbm_search_limit = 8; -- cgit v1.2.3