X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Fcmd_nand.c;h=44c4d1f89ce2b2e189d275ee297e7090835f5805;hb=eb3abce898ce0d9c711ed1d107bd8b0ccf3c07de;hp=634d03684b4365362e31d38c42cb395bfaea9aa7;hpb=d48455ad8cefd25d7b49f68fd16d0e9fd551732a;p=u-boot diff --git a/common/cmd_nand.c b/common/cmd_nand.c index 634d03684b..44c4d1f89c 100644 --- a/common/cmd_nand.c +++ b/common/cmd_nand.c @@ -574,7 +574,15 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) (u_char *)addr); else ret = nand_write_skip_bad(nand, off, &rwsize, - (u_char *)addr); + (u_char *)addr, 0); +#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, (u_char *)addr, 1); +#endif } else if (!strcmp(s, ".oob")) { /* out-of-band data */ mtd_oob_ops_t ops = { @@ -680,7 +688,12 @@ U_BOOT_CMD( "nand write - addr off|partition size\n" " read/write 'size' bytes starting at offset 'off'\n" " to/from memory address 'addr', skipping bad blocks.\n" - "nand erase[.spread] [clean] [off [size]] - erase 'size' bytes " +#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" " With '.spread', erase enough for given file size, otherwise,\n" " 'size' includes skipped bad blocks.\n" @@ -789,7 +802,6 @@ static int nand_load_image(cmd_tbl_t *cmdtp, nand_info_t *nand, /* Check if we should attempt an auto-start */ if (((ep = getenv("autostart")) != NULL) && (strcmp(ep, "yes") == 0)) { char *local_args[2]; - extern int do_bootm(cmd_tbl_t *, int, int, char *[]); local_args[0] = cmd; local_args[1] = NULL;