mtd/drivers/mtd/chips gen_probe.c,1.21,1.22
Russell King
rmk at infradead.org
Mon Jan 24 18:49:54 EST 2005
Update of /home/cvs/mtd/drivers/mtd/chips
In directory phoenix.infradead.org:/tmp/cvs-serv26691
Modified Files:
gen_probe.c
Log Message:
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.
Index: gen_probe.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/gen_probe.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- gen_probe.c 14 Aug 2004 15:14:05 -0000 1.21
+++ gen_probe.c 24 Jan 2005 23:49:50 -0000 1.22
@@ -162,7 +162,7 @@
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;
More information about the linux-mtd-cvs
mailing list