|
@@ -575,6 +575,16 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
|
|
else
|
|
else
|
|
ret = nand_write_skip_bad(nand, off, &rwsize,
|
|
ret = nand_write_skip_bad(nand, off, &rwsize,
|
|
(u_char *)addr, 0);
|
|
(u_char *)addr, 0);
|
|
|
|
+#ifdef CONFIG_CMD_NAND_TRIMFFS
|
|
|
|
+ } else if (!strcmp(s, ".trimffs")) {
|
|
|
|
+ if (read) {
|
|
|
|
+ printf("Unknown nand command suffix '%s'\n", s);
|
|
|
|
+ return 1;
|
|
|
|
+ }
|
|
|
|
+ ret = nand_write_skip_bad(nand, off, &rwsize,
|
|
|
|
+ (u_char *)addr,
|
|
|
|
+ WITH_DROP_FFS);
|
|
|
|
+#endif
|
|
#ifdef CONFIG_CMD_NAND_YAFFS
|
|
#ifdef CONFIG_CMD_NAND_YAFFS
|
|
} else if (!strcmp(s, ".yaffs")) {
|
|
} else if (!strcmp(s, ".yaffs")) {
|
|
if (read) {
|
|
if (read) {
|
|
@@ -689,6 +699,12 @@ U_BOOT_CMD(
|
|
"nand write - addr off|partition size\n"
|
|
"nand write - addr off|partition size\n"
|
|
" read/write 'size' bytes starting at offset 'off'\n"
|
|
" read/write 'size' bytes starting at offset 'off'\n"
|
|
" to/from memory address 'addr', skipping bad blocks.\n"
|
|
" to/from memory address 'addr', skipping bad blocks.\n"
|
|
|
|
+#ifdef CONFIG_CMD_NAND_TRIMFFS
|
|
|
|
+ "nand write.trimffs - addr off|partition size\n"
|
|
|
|
+ " write 'size' bytes starting at offset 'off' from memory address\n"
|
|
|
|
+ " 'addr', skipping bad blocks and dropping any pages at the end\n"
|
|
|
|
+ " of eraseblocks that contain only 0xFF\n"
|
|
|
|
+#endif
|
|
#ifdef CONFIG_CMD_NAND_YAFFS
|
|
#ifdef CONFIG_CMD_NAND_YAFFS
|
|
"nand write.yaffs - addr off|partition size\n"
|
|
"nand write.yaffs - addr off|partition size\n"
|
|
" write 'size' bytes starting at offset 'off' with yaffs format\n"
|
|
" write 'size' bytes starting at offset 'off' with yaffs format\n"
|