linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Very slow nor flash write
@ 2007-11-22 11:29 tike64
  2007-11-22 14:24 ` Alexey Korolev
  2007-11-22 18:12 ` Anders Grafström
  0 siblings, 2 replies; 7+ messages in thread
From: tike64 @ 2007-11-22 11:29 UTC (permalink / raw)
  To: linux-mtd

Dear List,

I have an LH7A400 board and there intel 28F160B3T nor flash chip. I managed to configure Linux 2.6.18 to access the chip as an MTD device. However, the write access was very slow, about 40ms per word or 0.00005 MB/s ;-)

I traced the problem to inval_cache_and_wait_for_operation() in cfi_cmdset_0001.c. In the for-loop, if the write access haven't finished when checked for the first time, a long "msleep(sleep_time/1000);" is triggered. The sleep duration is very long because chip_op_time value is 50000. The value comes from "cfi->chips[i].word_write_time = 50000;" in cfi_cmdset_0001(). That is wrong, I think. I changed it to 200 and now the writing is as fast as expected.

Now, the question is: How this should be fixed *correctly*? The 200 is the maximum word program time for this particular chip. Maybe it should have different value for different chips.

--

Timo

--

Note: Not everyone will face this problem. If the CPU is slow enough, so that the chip have finished before the first status check, then the problem doesn't occur. Also, when I placed one printk at the start of the inval_cache_and_wait_for_operation() function, the problem went away.





      ____________________________________________________________________________________
Be a better sports nut!  Let your teams follow you 
with Yahoo Mobile. Try it now.  http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ

^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <214802.55189.qm@web59211.mail.re1.yahoo.com>]

end of thread, other threads:[~2007-11-23 23:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-22 11:29 Very slow nor flash write tike64
2007-11-22 14:24 ` Alexey Korolev
2007-11-22 14:59   ` Jamie Lokier
2007-11-22 15:12   ` Nicolas Pitre
2007-11-22 18:04     ` Alexey Korolev
2007-11-22 18:12 ` Anders Grafström
     [not found] <214802.55189.qm@web59211.mail.re1.yahoo.com>
2007-11-23 22:36 ` Anders Grafström

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).