* flash write, erase & timeouts
@ 2000-07-27 9:40 Nick Ivanter
2000-07-31 7:38 ` David Woodhouse
0 siblings, 1 reply; 2+ messages in thread
From: Nick Ivanter @ 2000-07-27 9:40 UTC (permalink / raw)
To: mtd
Hi All.
Could anyone please explain the following thing which I see
in cfi_cmdset_0001.c.
After writing a Program command and data we are do
udelay(chip->word_write_time), but when erasing a sector
we instead call schedule_timeout(HZ) as the Erase command
is written. Is it just ocassionally or there is a point in
doing that way?
Thanks, Nick.
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: flash write, erase & timeouts
2000-07-27 9:40 flash write, erase & timeouts Nick Ivanter
@ 2000-07-31 7:38 ` David Woodhouse
0 siblings, 0 replies; 2+ messages in thread
From: David Woodhouse @ 2000-07-31 7:38 UTC (permalink / raw)
To: Nick Ivanter; +Cc: mtd
nick@auriga.ru said:
> Could anyone please explain the following thing which I see in
> cfi_cmdset_0001.c.
> After writing a Program command and data we are do udelay(chip->
> word_write_time), but when erasing a sector we instead call
> schedule_timeout(HZ) as the Erase command is written. Is it just
> ocassionally or there is a point in doing that way?
We expect the Program command to take around 128 µs, and we don't want to
schedule() for that period of time because we wouldn't get the CPU back
quickly enough - so we just drop all the locks and use udelay().
What you're looking at is roughly the form of the final implementation of
the Program command.
The Erase command, on the other hand, is expected to take around a second,
so we're happy to schedule() and wait for it. In fact, the intention is
that the erase() function call should return immediately, and that the
completion should be detected by a timer call, which calls the callback
function in the erase instruction structure.
--
dwmw2
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-07-31 7:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-07-27 9:40 flash write, erase & timeouts Nick Ivanter
2000-07-31 7:38 ` David Woodhouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox