summaryrefslogtreecommitdiff
path: root/common/cmd_nand.c
diff options
context:
space:
mode:
authorstroese <stroese>2004-12-16 17:45:46 +0000
committerstroese <stroese>2004-12-16 17:45:46 +0000
commita842a6d23c75d77effa9e444e4df47c86a03d06c (patch)
tree1fadeb5bcb08b163debf62f3676fbb263e7e3546 /common/cmd_nand.c
parent4aaf29b2f53386b267d8f59891b822ea65c48786 (diff)
downloadu-boot-imx-a842a6d23c75d77effa9e444e4df47c86a03d06c.zip
u-boot-imx-a842a6d23c75d77effa9e444e4df47c86a03d06c.tar.gz
u-boot-imx-a842a6d23c75d77effa9e444e4df47c86a03d06c.tar.bz2
added ".i" same as ".jffs2s" for compatibility with older units (CFG_NAND_SKIP_BAD_DOT_I)
Diffstat (limited to 'common/cmd_nand.c')
-rw-r--r--common/cmd_nand.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index c874e7c..af3c674 100644
--- a/common/cmd_nand.c
+++ b/common/cmd_nand.c
@@ -223,6 +223,14 @@ int do_nand (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
else if (cmdtail && !strcmp(cmdtail, ".e"))
cmd |= NANDRW_JFFS2; /* skip bad blocks */
#endif
+#ifdef CFG_NAND_SKIP_BAD_DOT_I
+ /* need ".i" same as ".jffs2s" for compatibility with older units (esd) */
+ /* ".i" for image -> read skips bad block (no 0xff) */
+ else if (cmdtail && !strcmp(cmdtail, ".i"))
+ cmd |= NANDRW_JFFS2; /* skip bad blocks (on read too) */
+ if (cmd & NANDRW_READ)
+ cmd |= NANDRW_JFFS2_SKIP; /* skip bad blocks (on read too) */
+#endif /* CFG_NAND_SKIP_BAD_DOT_I */
else if (cmdtail) {
printf ("Usage:\n%s\n", cmdtp->usage);
return 1;