Commit 0ff7f22efab06c9744e840a46ecaa6b3ed42809e

Authored by Alice Guo
Committed by Ye Li
1 parent 1d8a50993c

MLK-22842: nandbcb: add nandbcb dump command for i.MX6

Verify/dump boot structures.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
(cherry picked from commit 65354b516d9919509fadff096c1ba6808e6975cf)

Showing 1 changed file with 4 additions and 0 deletions Side-by-side Diff

arch/arm/mach-imx/cmd_nandbcb.c
... ... @@ -235,6 +235,10 @@
235 235 debug("NAND fcb write: 0x%x offset 0x%zx written: %s\n",
236 236 mtd->erasesize * i, ops.len, ret ?
237 237 "ERROR" : "OK");
  238 +
  239 + ops.datbuf = (u8 *)(dump_nand_fcb + i);
  240 + ops.oobbuf = ((u8 *)(dump_nand_fcb + i)) + mtd->writesize;
  241 + mtd_read_oob(mtd, mtd->erasesize * i, &ops);
238 242 }
239 243  
240 244 ret = mtd_write(mtd, mtd->erasesize * i + mtd->writesize,