mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
nand_util: convert nand_write_skip_bad() to flags
In a future commit the behaviour of nand_write_skip_bad() will be further extended. Convert the only flag currently passed to the nand_write_ skip_bad() function to a bitfield of only one allocated member. This should avoid an explosion of int's at the end of the parameter list or the ambiguous calls like nand_write_skip_bad(info, offset, len, buf, 0, 1, 1); nand_write_skip_bad(info, offset, len, buf, 0, 1, 0); Instead there will be: nand_write_skip_bad(info, offset, len, buf, WITH_YAFFS_OOB | WITH_OTHER); Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca> Acked-by: Detlev Zundel <dzu@denx.de> Signed-off-by: Scott Wood <scottwood@freescale.com>
This commit is contained in:
parent
bee038e9fe
commit
a6c9aa1f92
3 changed files with 10 additions and 6 deletions
|
@ -581,7 +581,8 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
|
|||
printf("Unknown nand command suffix '%s'.\n", s);
|
||||
return 1;
|
||||
}
|
||||
ret = nand_write_skip_bad(nand, off, &rwsize, (u_char *)addr, 1);
|
||||
ret = nand_write_skip_bad(nand, off, &rwsize,
|
||||
(u_char *)addr, WITH_YAFFS_OOB);
|
||||
#endif
|
||||
} else if (!strcmp(s, ".oob")) {
|
||||
/* out-of-band data */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue