From: Scott Wood <oss@buserror.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot,v3,2/2] nand: extend nand torture
Date: Sun, 19 Jun 2016 19:25:00 -0500 [thread overview]
Message-ID: <20160620002500.GA1982@home.buserror.net> (raw)
In-Reply-To: <1465805748-30110-2-git-send-email-max.krummenacher@toradex.com>
On Mon, Jun 13, 2016 at 10:15:48AM +0200, Max Krummenacher wrote:
> nand torture currently works on exactly one nand block which is specified
> by giving the byteoffset to the beginning of the block.
>
> Extend this by allowing for a second parameter specifying the byte size
> to be tested.
>
> e.g.
> ==> nand torture 1000000
>
> NAND torture: device 0 offset 0x1000000 size 0x20000 (block size 0x20000)
> Passed: 1, failed: 0
>
> ==> nand torture 1000000 40000
>
> NAND torture: device 0 offset 0x1000000 size 0x40000 (block size 0x20000)
> Passed: 2, failed: 0
>
> Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
> Reviewed-by: Beno?t Th?baudeau <benoit.thebaudeau.dev@gmail.com>
> ---
Applying with these changes:
diff --git a/cmd/nand.c b/cmd/nand.c
index 6d239a3..ffdeea4 100644
--- a/cmd/nand.c
+++ b/cmd/nand.c
@@ -659,11 +659,12 @@ static int do_nand(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
}
size = mtd->erasesize;
- if (argc > 3)
+ if (argc > 3) {
if (!str2off(argv[3], &size)) {
puts("Size is not a valid number\n");
return 1;
}
+ }
endoff = off + size;
if (endoff > mtd->size) {
@@ -803,7 +804,7 @@ static char nand_help_text[] =
"nand dump[.oob] off - dump page\n"
#ifdef CONFIG_CMD_NAND_TORTURE
"nand torture off - torture one block at offset\n"
- "nand torture off size - torture blocks from off to off+size\n"
+ "nand torture off [size] - torture blocks from off to off+size\n"
#endif
"nand scrub [-y] off size | scrub.part partition | scrub.chip\n"
" really clean NAND erasing bad blocks (UNSAFE)\n"
-Scott
prev parent reply other threads:[~2016-06-20 0:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-13 8:15 [U-Boot] [PATCH v3 1/2] nand: nand torture: follow sync with linux v4.6 Max Krummenacher
2016-06-13 8:15 ` [U-Boot] [PATCH v3 2/2] nand: extend nand torture Max Krummenacher
2016-06-13 20:19 ` Benoît Thébaudeau
2016-06-20 0:25 ` Scott Wood [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160620002500.GA1982@home.buserror.net \
--to=oss@buserror.net \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox