From: Alice Guo Date: Tue, 5 May 2020 14:04:02 +0000 (+0800) Subject: nandbcb: add nandbcb dump command for i.MX6 X-Git-Tag: v2020.07-rc2~3^2~13 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=49f84547057f4c4c268c0567a11052a8975450e2;p=oweals%2Fu-boot.git nandbcb: add nandbcb dump command for i.MX6 Verify/dump boot structures. Signed-off-by: Alice Guo Signed-off-by: Peng Fan --- diff --git a/arch/arm/mach-imx/cmd_nandbcb.c b/arch/arm/mach-imx/cmd_nandbcb.c index 02a65ffd43..a8531def35 100644 --- a/arch/arm/mach-imx/cmd_nandbcb.c +++ b/arch/arm/mach-imx/cmd_nandbcb.c @@ -309,6 +309,10 @@ static int write_fcb_dbbt_and_readback(struct mtd_info *mtd, debug("NAND fcb write: 0x%x offset 0x%zx written: %s\n", mtd->erasesize * i, ops.len, ret ? "ERROR" : "OK"); + + ops.datbuf = (u8 *)(dump_nand_fcb + i); + ops.oobbuf = ((u8 *)(dump_nand_fcb + i)) + mtd->writesize; + mtd_read_oob(mtd, mtd->erasesize * i, &ops); } ret = mtd_write(mtd, mtd->erasesize * i + mtd->writesize,