From: David Woodhouse <dwmw2@infradead.org>
To: Nick Ivanter <nick@auriga.ru>
Cc: mtd <mtd@infradead.org>
Subject: Re: flash write, erase & timeouts
Date: Mon, 31 Jul 2000 08:38:51 +0100 [thread overview]
Message-ID: <4061.965029131@cygnus.co.uk> (raw)
In-Reply-To: <39800397.3C3CB51B@auriga.ru>
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
prev parent reply other threads:[~2000-07-31 7:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-07-27 9:40 flash write, erase & timeouts Nick Ivanter
2000-07-31 7:38 ` David Woodhouse [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4061.965029131@cygnus.co.uk \
--to=dwmw2@infradead.org \
--cc=mtd@infradead.org \
--cc=nick@auriga.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox