diff options
Diffstat (limited to 'commands')
-rw-r--r-- | commands/Kconfig | 1 | ||||
-rw-r--r-- | commands/nandtest.c | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/commands/Kconfig b/commands/Kconfig index 767a20ed24..b3937fdd8d 100644 --- a/commands/Kconfig +++ b/commands/Kconfig @@ -1864,7 +1864,6 @@ config CMD_NANDTEST tristate depends on NAND depends on PARTITION - depends on NAND_ECC_HW || NAND_ECC_SOFT prompt "nandtest" help NAND flash memory test diff --git a/commands/nandtest.c b/commands/nandtest.c index bfe4c4c0ed..1bb59c7fdb 100644 --- a/commands/nandtest.c +++ b/commands/nandtest.c @@ -178,12 +178,14 @@ static int erase_and_write(loff_t ofs, unsigned char *data, } /* Print stats of nandtest. */ -static void print_stats(int nr_passes, int length) +static void print_stats(int nr_passes, loff_t length) { unsigned int i; + uint64_t blocks = (uint64_t)length; + + do_div(blocks, meminfo.erasesize); printf("-------- Summary --------\n"); - printf("Tested blocks : %d\n", (length/meminfo.erasesize) - * nr_passes); + printf("Tested blocks : %lld\n", blocks * nr_passes); for (i = 0; i < MAX_ECC_BITS; i++) printf("ECC %d bit error(s) : %u\n", i + 1, ecc_stats[i]); |