diff options
author | David Ungar <david.ungar@timesys.com> | 2010-10-11 14:22:33 -0400 |
---|---|---|
committer | David Ungar <david.ungar@timesys.com> | 2010-10-11 14:22:33 -0400 |
commit | c455ad7d7ceff60f0850697dc1949218972db3c8 (patch) | |
tree | be7b0391c166c296c231f5000ad3156960f178af /common | |
parent | b52e80bcc86390b6d2f09cec70a1a4bc5e970cb9 (diff) |
yaffs support
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_nand.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/common/cmd_nand.c b/common/cmd_nand.c index 158a55fa705..d71fc490778 100644 --- a/common/cmd_nand.c +++ b/common/cmd_nand.c @@ -389,6 +389,19 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) else ret = nand_write_skip_bad(nand, off, &size, (u_char *)addr); + } else if (s != NULL && !strcmp(s, ".yaffs")) { + nand_write_options_t opts; + memset(&opts, 0, sizeof(opts)); + opts.buffer = (u_char *) addr; + opts.length = size; + opts.offset = off; + opts.pad = 0; + opts.blockalign = 1; + opts.quiet = quiet; + opts.writeoob = 1; + opts.autoplace = 1; + opts.forceyaffs = 1; + nand_write_opts(nand, &opts); } else if (!strcmp(s, ".oob")) { /* out-of-band data */ mtd_oob_ops_t ops = { @@ -494,6 +507,8 @@ U_BOOT_CMD(nand, CONFIG_SYS_MAXARGS, 1, do_nand, "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 write[.yaffs] - addr off size - write `size' byte yaffs2 image\n" + " at offset `off' from memory address `addr'\n" "nand erase [clean] [off size] - erase 'size' bytes from\n" " offset 'off' (entire device if not specified)\n" "nand bad - show bad blocks\n" |