Re: [PATCH] AT91RM9200 NAND support

Savin Zlobec
2006-06-20T15:45:34Z

Thomas Gleixner wrote:

>On Tue, 2006-06-20 at 16:24 +0200, Savin Zlobec wrote:
>
>
>>Indeed it is the STATUS command. If I don't wait after it I can't copy
>>a single file on the jffs2 partition, inserting a wait there seems to solve
>>the problem.
>>
>>
>
>Well, we also delay the codepath in nand_wait() with this. It feels
>terribly wrong and the problem is just hidden by that check.
>
>Can you please remove the wait again and add a check of the r/b pin to
>
>static int nand_wait(struct mtd_info *mtd, struct nand_chip *chip, int state)
>{
>
>just before the
>
> return status;
>}
>
>
The problem is in nand_wait, the function is called (when writting files
to jffs2) with
chip->state=FL_READING and state=FL_WRITING and consequently the waiting
is terminated instantly (chip->state != state) leaving the chip in busy
state.

savin