From: Russell King <rmk@arm.linux.org.uk>
To: dwmw2@infradead.org, linux-mtd@lists.infradead.org
Subject: Fix MTD device probing... (really)
Date: Mon, 24 Jan 2005 23:39:41 +0000 [thread overview]
Message-ID: <20050124233941.C5541@flint.arm.linux.org.uk> (raw)
Fix MTD device probing, trying larger numbers of chips before smaller
numbers of chips across the bus width.
This means we'll avoid misdetecting a 2 x16 array as 1 x32 if the
high 16-bits happen to read as zeros in the QRY area.
--- orig/drivers/mtd/chips/gen_probe.c Sat Oct 23 11:38:17 2004
+++ linux/drivers/mtd/chips/gen_probe.c Mon Jan 24 22:54:38 2005
@@ -162,7 +162,7 @@ static int genprobe_new_chip(struct map_
int max_chips = map_bankwidth(map); /* And minimum 1 */
int nr_chips, type;
- for (nr_chips = min_chips; nr_chips <= max_chips; nr_chips <<= 1) {
+ for (nr_chips = max_chips; nr_chips >= min_chips; nr_chips >>= 1) {
if (!cfi_interleave_supported(nr_chips))
continue;
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
next reply other threads:[~2005-01-24 23:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-24 23:39 Russell King [this message]
2005-01-24 23:43 ` Fix MTD device probing... (really) David Woodhouse
-- strict thread matches above, loose matches on Subject: below --
2009-08-26 10:25 Guillaume LECERF
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=20050124233941.C5541@flint.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--cc=dwmw2@infradead.org \
--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