Skip to content
Snippets Groups Projects
Commit a430b137 authored by Lei Wen's avatar Lei Wen Committed by Scott Wood
Browse files

onenand: fix oob print out issue


Seems original implementation forget to set the pointer to point
to the oobbuf, so when we want to see oob buf, we see nothing...
Fix it by get pointer as the oobbuf set.

Signed-off-by: default avatarLei Wen <leiwen@marvell.com>
parent 59bbb3a8
No related branches found
No related tags found
No related merge requests found
...@@ -293,7 +293,7 @@ static int onenand_dump(struct mtd_info *mtd, ulong off, int only_oob) ...@@ -293,7 +293,7 @@ static int onenand_dump(struct mtd_info *mtd, ulong off, int only_oob)
addr = (loff_t) off; addr = (loff_t) off;
memset(&ops, 0, sizeof(ops)); memset(&ops, 0, sizeof(ops));
ops.datbuf = datbuf; ops.datbuf = datbuf;
ops.oobbuf = oobbuf; /* must exist, but oob data will be appended to ops.datbuf */ ops.oobbuf = oobbuf;
ops.len = mtd->writesize; ops.len = mtd->writesize;
ops.ooblen = mtd->oobsize; ops.ooblen = mtd->oobsize;
ops.retlen = 0; ops.retlen = 0;
...@@ -319,6 +319,8 @@ static int onenand_dump(struct mtd_info *mtd, ulong off, int only_oob) ...@@ -319,6 +319,8 @@ static int onenand_dump(struct mtd_info *mtd, ulong off, int only_oob)
} }
puts("OOB:\n"); puts("OOB:\n");
i = mtd->oobsize >> 3; i = mtd->oobsize >> 3;
p = oobbuf;
while (i--) { while (i--) {
printf("\t%02x %02x %02x %02x %02x %02x %02x %02x\n", printf("\t%02x %02x %02x %02x %02x %02x %02x %02x\n",
p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7]); p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment