Fw: corrupt my NAND flash device
Thomas Gleixner
tglx at linutronix.de
Wed Apr 30 14:13:41 EDT 2003
On Wednesday 30 April 2003 18:54, Alex Samoutin wrote:
> Yes I had absolutely the same problem. Some times first write command was
> ignored, but second always successful. However I have no problem with erase
> operations, only write some times was ignored.
>
> (For Thomas) It’s not a bad H/W or incorrect timing. I’ve played with
> timing and result was the same. Also I have 5 boards with Toshiba NAND chip
> and 2 of them are working fine without retry, but other 3 need retry for
> normal operation.
What timing params did you play with ?
Are CLE/ALE connected to GPIO pins ?
Do you use a ready function, which reads the R/B hardware pin ?
Can you please check the following:
1. Add a delay into nand_wait and play with the time
--- nand.c 14 Apr 2003 07:00:39 -0000 1.43
+++ nand.c 30 Apr 2003 17:05:26 -0000
@@ -226,6 +226,8 @@
this->hwcontrol (NAND_CTL_CLRALE);
}
+ udelay (500);
+
/*
* program and erase have their own busy handlers
* status and sequential in needs no delay
2.. Report if that helps or changes anything
3. Remove the erase abort in nand_get_chip
--- nand.c 14 Apr 2003 07:00:39 -0000 1.43
+++ nand.c 30 Apr 2003 17:08:23 -0000
@@ -287,16 +287,6 @@
return;
}
- if (this->state == FL_ERASING) {
- if (new_state != FL_ERASING) {
- this->state = new_state;
- spin_unlock_bh (&this->chip_lock);
- nand_select (); /* select in any case */
- this->cmdfunc(mtd, NAND_CMD_RESET, -1, -1);
- return;
- }
- }
-
set_current_state (TASK_UNINTERRUPTIBLE);
add_wait_queue (&this->wq, &wait);
spin_unlock_bh (&this->chip_lock);
4.. Report if that helps or changes anything
Thanks
--
Thomas
________________________________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx at linutronix.de
More information about the linux-mtd
mailing list