[U-Boot] PATCH: bugfix for nand erase failure with bad blocks

Michele De Candia (VT) michele.decandia at valueteam.com
Wed Jun 17 18:17:40 CEST 2009


Scott Wood wrote:
> On Wed, Jun 17, 2009 at 09:44:41AM +0200, Michele De Candia (VT) wrote:
>   
>> Moreover, I think that if you want to erase a specific NAND area, the  
>> correct way to use 'nand erase' command would be:
>>
>> 'nand erase start end'
>>
>> If you want to erase  an area but you want to be sure that 'size' bytes  
>> were erased, you should use:
>>
>> 'nand erase off size'
>>     
>
> How would the "nand erase" command reliably distinguish between the two alternatives?
>
> What we could do is extend the "plus" semantics (which currently allow
> rounding the size up to a block boundary) so that if you have a plus sign
> before the size it is interpreted the same as read/write.
>   

As you has suggested we could use:

'nand erase start end'

and

'nand erase off +size'

> I'm a little uneasy about changing the normal erase command from size to end
> -- it would break existing uses.  Though, it would make it consistent with
> the NOR erase command.  Perhaps a period where it warns but accepts anyway a
> size, if the second parameter is less than the first.
>   

This doesn't work always: for example, when you erase at the NAND begin, 
second parameter could be greater than first one.

It can always warn user when he uses the first erase way.

> -Scott
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>   




More information about the U-Boot mailing list