mtd/drivers/mtd/devices doc2000.c,1.49,1.50 doc2001.c,1.37,1.38
gleixner at infradead.org
gleixner at infradead.org
Tue Dec 10 10:05:45 EST 2002
Update of /home/cvs/mtd/drivers/mtd/devices
In directory phoenix.infradead.org:/tmp/cvs-serv2344
Modified Files:
doc2000.c doc2001.c
Log Message:
Fixed chipdetection
Index: doc2000.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/doc2000.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- doc2000.c 1 Dec 2002 13:24:14 -0000 1.49
+++ doc2000.c 10 Dec 2002 15:05:42 -0000 1.50
@@ -315,7 +315,7 @@
static int DoC_IdentChip(struct DiskOnChip *doc, int floor, int chip)
{
- int mfr, id, i;
+ int mfr, id, i, j;
volatile char dummy;
/* Page in the required floor/chip */
@@ -375,14 +375,14 @@
for (i = 0; nand_flash_ids[i].name != NULL; i++) {
if (id == nand_flash_ids[i].id) {
/* Try to identify manufacturer */
- for (i = 0; nand_manuf_ids[i].id != 0x0; i++) {
- if (nand_manuf_ids[i].id == mfr)
+ for (j = 0; nand_manuf_ids[j].id != 0x0; j++) {
+ if (nand_manuf_ids[j].id == mfr)
break;
}
printk(KERN_INFO
"Flash chip found: Manufacturer ID: %2.2X, "
- "Chip ID: %2.2X (%s)\n", mfr, id,
- nand_flash_ids[i].name);
+ "Chip ID: %2.2X (%s:%s)\n", mfr, id,
+ nand_manuf_ids[j].name, nand_flash_ids[i].name);
if (!doc->mfr) {
doc->mfr = mfr;
doc->id = id;
Index: doc2001.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/doc2001.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- doc2001.c 1 Dec 2002 13:24:14 -0000 1.37
+++ doc2001.c 10 Dec 2002 15:05:42 -0000 1.38
@@ -181,7 +181,7 @@
/* DoC_IdentChip: Identify a given NAND chip given {floor,chip} */
static int DoC_IdentChip(struct DiskOnChip *doc, int floor, int chip)
{
- int mfr, id, i;
+ int mfr, id, i, j;
volatile char dummy;
/* Page in the required floor/chip
@@ -215,15 +215,15 @@
/* FIXME: to deal with multi-flash on multi-Millennium case more carefully */
for (i = 0; nand_flash_ids[i].name != NULL; i++) {
- if ( id == nand_flash_ids[i].model_id) {
+ if ( id == nand_flash_ids[i].id) {
/* Try to identify manufacturer */
- for (i = 0; nand_manuf_ids[i].id != 0x0; i++) {
- if (nand_manuf_ids[i].id == mfr)
+ for (j = 0; nand_manuf_ids[j].id != 0x0; j++) {
+ if (nand_manuf_ids[j].id == mfr)
break;
}
printk(KERN_INFO "Flash chip found: Manufacturer ID: %2.2X, "
- "Chip ID: %2.2X (%s)\n",
- mfr, id, nand_flash_ids[i].name);
+ "Chip ID: %2.2X (%s:%s)\n",
+ mfr, id, nand_manuf_ids[j].name, nand_flash_ids[i].name);
doc->mfr = mfr;
doc->id = id;
doc->chipshift = nand_flash_ids[i].chipshift;
More information about the linux-mtd-cvs
mailing list