From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] NAND: Change nand_wait_ready() to not call nand_wait()
Date: Sat, 5 Jan 2008 16:54:23 +0100 [thread overview]
Message-ID: <1199548463-15543-1-git-send-email-sr@denx.de> (raw)
This patch changes nand_wait_ready() to not just call nand_wait(),
since this will send a new command to the NAND chip. We just want to
wait for the chip to become ready here.
Signed-off-by: Stefan Roese <sr@denx.de>
---
William & Stig, could you please review this patch and test it on your
platforms?
Thanks.
drivers/mtd/nand/nand_base.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 5a8196e..6c5c794 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -489,7 +489,16 @@ EXPORT_SYMBOL_GPL(nand_wait_ready);
void nand_wait_ready(struct mtd_info *mtd)
{
struct nand_chip *chip = mtd->priv;
- nand_wait(mtd, chip);
+ u32 timeo = (CFG_HZ * 20) / 1000;
+
+ reset_timer();
+
+ /* wait until command is processed or timeout occures */
+ while (get_timer(0) < timeo) {
+ if (chip->dev_ready)
+ if (chip->dev_ready(mtd))
+ break;
+ }
}
#endif
--
1.5.4.rc2
next reply other threads:[~2008-01-05 15:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-05 15:54 Stefan Roese [this message]
2008-01-05 16:15 ` [U-Boot-Users] NAND driver updates Stefan Roese
2008-01-08 10:05 ` Matthias Fuchs
2008-01-08 22:06 ` ksi at koi8.net
2008-01-13 7:24 ` Dirk Behme
2008-01-13 8:14 ` ksi at koi8.net
2008-01-09 23:03 ` Matthias Fuchs
2008-01-10 5:45 ` Stefan Roese
2008-01-10 17:46 ` Stefan Roese
2008-01-15 8:49 ` Stefan Roese
2008-01-15 12:34 ` Matthias Fuchs
2008-01-15 12:48 ` Stig A. Olsen
2008-01-15 17:56 ` ksi at koi8.net
2008-01-16 13:45 ` Stefan Roese
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=1199548463-15543-1-git-send-email-sr@denx.de \
--to=sr@denx.de \
--cc=u-boot@lists.denx.de \
/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