[U-Boot-Users] What's the status on erasing a nand flash with bad blocks?

mitsy
2006-10-06T15:10:53Z

Hi,

It looks like Guido is working on a patch for this. I modified the
code for myself to handle the bad blocks and it seem to work fine. I
will wait for Guido's patch and compare with what I did.

Thank you Stefan and Guido!

On 10/6/06, Stefan Roese <sr@denx.de> wrote:
> Hi Mitsy,
>
> On Thursday 05 October 2006 17:04, mitsy wrote:
> > There was a discussion on how to handle the bad blocks when erasing
> > entire nand flash few month ago. I was curious to know what you all
> > decided on how to handle the issue.
> >
> > Now I got a nand flash (Samsung) with 2 bad blocks and I can erase and
> > program it from kernel using flash_eraseall and nandwrite just fine.
> > However, from u-boot (I'm using a newer nand driver, btw) the erase
> > stops at the first bad block, as you know.
> >
> > I'm little hesitant to just fix the code to skip the bad blocks during
> > erase/write since like it was discussed on the earlier thread,
> > kernel's mtd driver do it that way as well...
> >
> > Any comments/update on this issue will be very helpful!
>
> When I remember correctly, Wolfgang was a little hesitantly to accept any
> changes to this code, because it was taken directly from the Linux MTD code.
> But as Ladislav Michl (the original comitter of the new NAND code) stated,
> this is because the erase is normally done from the mtd-utils package:
>
> http://article.gmane.org/gmane.comp.boot-loaders.u-boot/23621
>
> I would suggest that we change the current U-Boot code, so that erasing
> doesn't stop at bad blocks anymore, but skips them and prints a message, like
> the linux flash_eraseall utility:
>
> "Skipping bad block at 0x%08x"
>
> Wolfgang: Would this be ok for you?
>
> Mitsy: Are you willing to create a patch for this?
>
> Best regards,
> Stefan
>