IMPORTANT NOTE to all maintainers w [...]
Hello list,
inside the automatic U-Boot patch tracking system a new ticket [DNX#2006040142001132] was created:
<snip>
Quoted 88 lines · Pantelis Antoniou
Hi Wolfgang & Pantelis,
Quoted 1 line
A few things are missing but most are doable.
Here is one of those 'few' things - erasing OOB area...
Signed-off-by Ladislav Michl <[email protected]>
CHANGELOG
* Implement NAND OOB erase command
Patch by Ladislav Michl, 17 Mar 2006common/cmd_nand.c +5
-4@@ -198,13 +198,15 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, }if (strcmp (cmd,"erase" ) ==0 ) { -arg_off_size (argc -2 , argv +2 , &off, &size, nand->size); +int clean = (argc >2 &&strcmp (argv[2 ],"clean" ) ==0 ) ?1 :0 ; +int o = clean ?3 :2 ; +arg_off_size (argc - o, argv + o, &off, &size, nand->size);if (off ==0 && size ==0 ) -return 1 ; + size = nand->size;printf ("\nNAND erase: device %d offset 0x%x, size 0x%x " , nand_curr_device, off, size); - ret =nand_erase (nand, off, size); + ret =nand_erase (nand, off, size, clean);printf ("%s\n" , ret ?"ERROR" :"OK" );return ret ==0 ?0 :1 ;@@ -275,7 +277,6 @@ U_BOOT_CMD(nand, 5, 1, do_nand," offset `off' (entire device if not specified)\n" "nand bad - show bad blocks\n" "nand dump[.oob] off - dump page\n" -"nand scrub - really clean NAND erasing bad blocks (UNSAFE)\n" "nand markbad off - mark bad block at offset (UNSAFE)\n" "nand biterr off - make a bit error at offset (UNSAFE)\n");common/env_nand.c +1
-1@@ -116,7 +116,7 @@ int saveenv(void)int ret =0 ;puts ("Erasing Nand..." ); -if (nand_erase (&nand_info[0 ],CFG_ENV_OFFSET ,CFG_ENV_SIZE )) +if (nand_erase (&nand_info[0 ],CFG_ENV_OFFSET ,CFG_ENV_SIZE ,0 ))return 1 ;puts ("Writing to Nand... " );include/nand.h +2
-3@@ -48,7 +48,7 @@ static inline int nand_block_isbad(nand_return info->block_isbad (info, ofs); } -static inline int nand_erase (nand_info_t *info,ulong off,ulong size) +static inline int nand_erase (nand_info_t *info,ulong off,ulong size,int clean) {struct erase_info instr;@@ -57,7 +57,7 @@ static inline int nand_erase(nand_info_t instr.len = size; instr.callback =0 ; -return info->erase (info, &instr); + return nand_erase_nand(info, &instr, clean); }#endif -------------------------------------------------------This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live
Quoted 8 lines
webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users
</snip>
Your U-Boot support team