diff options
author | Wolfgang Denk <wd@denx.de> | 2012-03-03 15:15:07 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2012-03-03 15:15:07 +0100 |
commit | e91004201c4265edf7897c4f8e0c21cd1dce0505 (patch) | |
tree | 97ca0cd21a4909774d9475f3198b610eeb7324c9 /common | |
parent | 8a1239e74cdf4d94738eb71928769d6e78bcc78c (diff) | |
parent | cfdae12f37ad126d1198f6c1ffa4ada9e69dd206 (diff) | |
download | u-boot-imx-e91004201c4265edf7897c4f8e0c21cd1dce0505.zip u-boot-imx-e91004201c4265edf7897c4f8e0c21cd1dce0505.tar.gz u-boot-imx-e91004201c4265edf7897c4f8e0c21cd1dce0505.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-nand-flash
* 'master' of git://git.denx.de/u-boot-nand-flash:
cmd_nand.c: Fix 'nand dump' after latest MTD resync
mtd/nand:Fix wrong usage of is_blank() in fsl_ifc_run_command
mtd/nand: Fix IFC driver to support 2K NAND page
nand: reinstate lazy bad block scanning
Revert "nand: make 1-bit software ECC configurable"
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_nand.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/common/cmd_nand.c b/common/cmd_nand.c index 3e2edb8..fa96a52 100644 --- a/common/cmd_nand.c +++ b/common/cmd_nand.c @@ -48,7 +48,7 @@ static int nand_dump(nand_info_t *nand, ulong off, int only_oob, int repeat) last = off; - datbuf = malloc(nand->writesize + nand->oobsize); + datbuf = malloc(nand->writesize); oobbuf = malloc(nand->oobsize); if (!datbuf || !oobbuf) { puts("No memory for page buffer\n"); @@ -59,7 +59,7 @@ static int nand_dump(nand_info_t *nand, ulong off, int only_oob, int repeat) struct mtd_oob_ops ops; memset(&ops, 0, sizeof(ops)); ops.datbuf = datbuf; - ops.oobbuf = oobbuf; /* must exist, but oob data will be appended to ops.datbuf */ + ops.oobbuf = oobbuf; ops.len = nand->writesize; ops.ooblen = nand->oobsize; ops.mode = MTD_OOB_RAW; @@ -85,6 +85,7 @@ static int nand_dump(nand_info_t *nand, ulong off, int only_oob, int repeat) } puts("OOB:\n"); i = nand->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]); |