From 004a1fdb45fb06ee2faf6e50945ceb79d43a2f41 Mon Sep 17 00:00:00 2001 From: Peter Tyser Date: Tue, 3 Feb 2015 11:58:16 -0600 Subject: nand: yaffs: Remove the "nand write.yaffs" command This command is only enabled by one board, complicates the NAND code, and doesn't appear to have been functioning properly for several years. If there are no bad blocks in the NAND region being written nand_write_skip_bad() will take the shortcut of calling nand_write() which bypasses the special yaffs handling. This causes invalid YAFFS data to be written. See http://lists.denx.de/pipermail/u-boot/2011-September/102830.html for an example and a potential workaround. U-Boot still retains the ability to mount and access YAFFS partitions via CONFIG_YAFFS2. Signed-off-by: Peter Tyser --- common/cmd_nand.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'common') diff --git a/common/cmd_nand.c b/common/cmd_nand.c index bada28cb7a..17fa7ea6bd 100644 --- a/common/cmd_nand.c +++ b/common/cmd_nand.c @@ -704,16 +704,6 @@ static int do_nand(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) ret = nand_write_skip_bad(nand, off, &rwsize, NULL, maxsize, (u_char *)addr, WITH_DROP_FFS | WITH_WR_VERIFY); -#endif -#ifdef CONFIG_CMD_NAND_YAFFS - } else if (!strcmp(s, ".yaffs")) { - if (read) { - printf("Unknown nand command suffix '%s'.\n", s); - return 1; - } - ret = nand_write_skip_bad(nand, off, &rwsize, NULL, - maxsize, (u_char *)addr, - WITH_YAFFS_OOB | WITH_WR_VERIFY); #endif } else if (!strcmp(s, ".oob")) { /* out-of-band data */ @@ -856,11 +846,6 @@ static char nand_help_text[] = " 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 - "nand write.yaffs - addr off|partition size\n" - " write 'size' bytes starting at offset 'off' with yaffs format\n" - " from memory address 'addr', skipping bad blocks.\n" #endif "nand erase[.spread] [clean] off size - erase 'size' bytes " "from offset 'off'\n" -- cgit v1.2.3