mtd/drivers/mtd/chips gen_probe.c,1.20,1.21
David Woodhouse
dwmw2 at infradead.org
Sat Aug 14 11:14:08 EDT 2004
Update of /home/cvs/mtd/drivers/mtd/chips
In directory phoenix.infradead.org:/tmp/cvs-serv20932
Modified Files:
gen_probe.c
Log Message:
Don't probe for chips which are smaller than width/interleave.
Index: gen_probe.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/gen_probe.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- gen_probe.c 12 Aug 2004 06:40:23 -0000 1.20
+++ gen_probe.c 14 Aug 2004 15:14:05 -0000 1.21
@@ -169,8 +169,12 @@
cfi->interleave = nr_chips;
- for (type = 0; type < 3; type++) {
- cfi->device_type = 1<<type;
+ /* Minimum device size. Don't look for one 8-bit device
+ in a 16-bit bus, etc. */
+ type = map_bankwidth(map) / nr_chips;
+
+ for (; type <= CFI_DEVICETYPE_X32; type<<=1) {
+ cfi->device_type = type;
if (cp->probe_chip(map, 0, NULL, cfi))
return 1;
More information about the linux-mtd-cvs
mailing list