nandbcb: add nandbcb dump command for i.MX6
authorAlice Guo <alice.guo@nxp.com>
Tue, 5 May 2020 14:04:02 +0000 (22:04 +0800)
committerStefano Babic <sbabic@denx.de>
Sun, 10 May 2020 18:55:20 +0000 (20:55 +0200)
Verify/dump boot structures.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
arch/arm/mach-imx/cmd_nandbcb.c

index 02a65ffd438e8c604f6fd0dd4394ce4968a28503..a8531def35bee0ea3b4c2e5c56c44cfaef6c6d76 100644 (file)
@@ -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");
                        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,
                }
 
                ret = mtd_write(mtd, mtd->erasesize * i + mtd->writesize,