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: Lei Wen <lei...@marvell.com>
---
 common/cmd_onenand.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/common/cmd_onenand.c b/common/cmd_onenand.c
index 33108f1..6d77495 100644
--- a/common/cmd_onenand.c
+++ b/common/cmd_onenand.c
@@ -319,6 +319,8 @@ static int onenand_dump(struct mtd_info *mtd, ulong off, 
int only_oob)
        }
        puts("OOB:\n");
        i = mtd->oobsize >> 3;
+       p = oobbuf;
+
        while (i--) {
                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]);
-- 
1.7.0.4

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to