[U-Boot] [PATCH 5/5] cmd_nand: also drop 0xff pages for jffs2
Ben Gardiner
bengardiner at nanometrics.ca
Thu Apr 28 23:47:55 CEST 2011
The behaviour of dropping trailing 0xff pages of an eraseblock was
observed to fix JFFS2 images on da850evm which usually resulted in
numerous 'ECC errors.'
Assign also the behaviour of dropping trailing 0xff pages to the
.jffs2 nand write variant as it was to the previously introduced
.ubi variant.
Signed-off-by: Ben Gardiner <bengardiner at nanometrics.ca>
---
common/cmd_nand.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index faece07..b9d5ae6 100644
--- a/common/cmd_nand.c
+++ b/common/cmd_nand.c
@@ -567,12 +567,11 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
rwsize = size;
s = strchr(cmd, '.');
- if (!strcmp(s, ".ubi")) {
+ if (!strcmp(s, ".ubi") || !strcmp(s, ".jffs2")) {
ret = nand_write_skip_bad(nand, off, &rwsize,
(u_char *)addr,
WITH_DROP_FFS);
- } else if (!s || !strcmp(s, ".jffs2") ||
- !strcmp(s, ".e") || !strcmp(s, ".i")) {
+ } else if (!s || !strcmp(s, ".e") || !strcmp(s, ".i")) {
if (read)
ret = nand_read_skip_bad(nand, off, &rwsize,
(u_char *)addr);
--
1.7.1
More information about the U-Boot
mailing list