From: Markus Niebel <list-09_linux_mtd@tqsc.de>
To: linux-mtd@lists.infradead.org
Subject: [PATCH 2.6.34 1/2] cfi_cmdset_0002.c: Read max timeouts from cfi query data
Date: Fri, 25 Mar 2011 08:52:39 +0100 [thread overview]
Message-ID: <4D8C49C7.5090700@tqsc.de> (raw)
The max timeouts are coded in the electronic flash data sheet (CFI query
data). Read the timeouts and store them in the chips structure table.
Signed-off-by: Markus Niebel <markus.niebel@tqs.de>
---
drivers/mtd/chips/cfi_cmdset_0002.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c
b/drivers/mtd/chips/cfi_cmdset_0002.c
index 38c47b0..1eb8bfa 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -429,6 +429,27 @@ struct mtd_info *cfi_cmdset_0002(struct map_info
*map, int primary)
cfi->chips[i].word_write_time = 1<<cfi->cfiq->WordWriteTimeoutTyp;
cfi->chips[i].buffer_write_time = 1<<cfi->cfiq->BufWriteTimeoutTyp;
cfi->chips[i].erase_time = 1<<cfi->cfiq->BlockEraseTimeoutTyp;
+
+ /* FIXME: use also max times, verify if valid */
+ cfi->chips[i].word_write_time_max =
+ (1<<(cfi->cfiq->WordWriteTimeoutTyp)) *
+ (1<<(cfi->cfiq->WordWriteTimeoutMax));
+ cfi->chips[i].buffer_write_time_max =
+ (1<<(cfi->cfiq->BufWriteTimeoutTyp)) *
+ (1<<(cfi->cfiq->BufWriteTimeoutMax));
+ cfi->chips[i].erase_time_max =
+ (1<<(cfi->cfiq->BlockEraseTimeoutTyp)) *
+ (1<<(cfi->cfiq->BlockEraseTimeoutMax));
+
+ printk(KERN_INFO "MTD: %s erase time %u / %u ms\n", __func__,
+ cfi->chips[i].erase_time, cfi->chips[i].erase_time_max);
+ printk(KERN_INFO "MTD: %s word time %u / %u us\n", __func__,
+ cfi->chips[i].word_write_time,
+ cfi->chips[i].word_write_time_max);
+ printk(KERN_INFO "MTD: %s buffer time %u / %u us\n", __func__,
+ cfi->chips[i].buffer_write_time,
+ cfi->chips[i].buffer_write_time_max);
+
cfi->chips[i].ref_point_counter = 0;
init_waitqueue_head(&(cfi->chips[i].wq));
}
next reply other threads:[~2011-03-25 7:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-25 7:52 Markus Niebel [this message]
2011-04-01 7:31 ` [PATCH 2.6.34 1/2] cfi_cmdset_0002.c: Read max timeouts from cfi query data Artem Bityutskiy
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=4D8C49C7.5090700@tqsc.de \
--to=list-09_linux_mtd@tqsc.de \
--cc=linux-mtd@lists.infradead.org \
/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