summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2016-09-20 16:12:19 -0700
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2016-11-21 14:29:57 +0100
commit44febffa12316e2a9ee7e4c1fa92f20c1f66d6bd (patch)
tree431ecf3190ff1d0c26859f8c6bf7f4ba38ea49a9
parenta888b5b88f078c8aaf1772f4eaa48f9625e78983 (diff)
cmd_writebcb_mx7: create FCB without errata e9609 work-around
Create a FCB without work-around for errata e9609. With that FCB in place the firmware can be written using the standard nand write command like: nand write ${loadaddr} u-boot ${filesize} Using sectors_in_firmware{1|2} seems not to make any difference and is also not set on Vybrid, hence do not set it anymore. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r--arch/arm/imx-common/cmd_writebcb_mx7.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/arm/imx-common/cmd_writebcb_mx7.c b/arch/arm/imx-common/cmd_writebcb_mx7.c
index 4267cd7546..c2c5be0cd4 100644
--- a/arch/arm/imx-common/cmd_writebcb_mx7.c
+++ b/arch/arm/imx-common/cmd_writebcb_mx7.c
@@ -297,7 +297,6 @@ static void create_fcb(nand_info_t *nand, uint8_t *buf, int fw1_start_address,
int i;
struct mxs_nand_fcb _fcb;
struct mxs_nand_fcb *fcb = &_fcb;
- int fw_size = BOOTLOADER_MAXSIZE;
memset (fcb, 0, sizeof(struct mxs_nand_fcb));
fcb->fingerprint = 0x20424346;
@@ -316,20 +315,19 @@ static void create_fcb(nand_info_t *nand, uint8_t *buf, int fw1_start_address,
fcb->ecc_block_n_size = 512;
fcb->ecc_block_0_ecc_type = 4;
fcb->metadata_bytes = 10;
- fcb->num_ecc_blocks_per_page = 2;
+ fcb->num_ecc_blocks_per_page = 3;
fcb->firmware1_starting_sector = fw1_start_address / nand->writesize;
fcb->firmware2_starting_sector = fw2_start_address / nand->writesize;
- fcb->sectors_in_firmware1 = DIV_ROUND_UP(fw_size, 3 * 512);
- fcb->sectors_in_firmware2 = DIV_ROUND_UP(fw_size, 3 * 512);
fcb->dbbt_search_area_start_address = 256;
fcb->badblock_marker_byte = 1999;
- fcb->bb_marker_physical_offset = 2048;
+
/* This is typically the first byte of the pages OOB area */
fcb->bb_marker_physical_offset = nand->writesize;
- /* workaround bug in bootrom, see errata */
- fcb->disbbm = 1;
+
+ /* Required for successful factory bad block detection */
+ fcb->disbbm = 0;
fcb->disbbm_search = 0;
/* compute checksum, ~(sum of bytes starting with offset 4) */