last commit breaks the AMD NOR flash functionality?
Thomas Gleixner
tglx at linutronix.de
Tue May 24 11:01:44 EDT 2005
On Tue, 2005-05-24 at 18:37 +0400, Vitaly Wool wrote:
> > /* Did we succeed? */
> >- if (chip_good(map, adr, map_word_ff(map))) {
> >+ if (!chip_good(map, adr, map_word_ff(map))) {
> > /* reset on all failures. */
> > map_write( map, CMD(0xF0), chip->start );
> > /* FIXME - should have reset delay before continuing */
> >
> If I roll it back, it starts working.
> I also suspected something strange with 'if(chip_good(...)) ...' instead
> of 'if(!chip_good(...)) ...' but it worked before and it doesn't work
> now. Can anyone elaborate this a bit?
I had the same problem you see before the fix. It took a bit to figure
out what was going wrong.
I'm quite sure, that my fix is correct, because the previous revision
exited via the error path in case of no error.
I suspect, that something goes really wrong with your erase. You have to
check the results in chip_good.
The chip_good function reads the same address twice and compares whether
the results are equal. The chip good result also requires that the reads
are all 0xff.
I suggest to add a check into chip_good, where you can identify which of
the requirements is not fulfilled to further narrow down the source of
trouble
tglx
More information about the linux-mtd
mailing list