Problems with 128MB DoC 2000

Dave Dillow dave at thedillows.org
Wed Jul 30 19:55:51 EDT 2003


I've got a DoC MD2202-D128-X that I'm trying to get working with Linux.
The binary only drivers from M-Sys may be an option, but I'd much rather
have the source to work with.

I first tried the CVS version of docprobe, and it reported an unknown
chip ID of 0x30. Following an exchange between David Woodhouse and Zachi
Friedman, I cooked up the attached patch to docprobe, which lets it find
my 2000, but then it fails with the following errors:

Using configured DiskOnChip probe address 0xd0000
DiskOnChip 2000 found at address 0xD0000
Unknown flash chip found: C6 C6
Please report to dwmw2 at infradead.org
Unknown flash chip found: C6 C6
Please report to dwmw2 at infradead.org
Unknown flash chip found: C6 C6
Please report to dwmw2 at infradead.org
Unknown flash chip found: C6 C6
Please report to dwmw2 at infradead.org
No flash chips recognised.

It seems kind of odd that the flash id and manufacturer id are the same
number, so I also tried forcing the chip to be a Millennium, and got the
expected failure -- it did not report unknown flash chips; it didn't see
any at all.

So, if doc2000.c is working for DoC 2000 < 128MB, then it looks like the
new ASIC changed more than just the toggle bit?

I have a fairly urgent need to get this working in some form or fashion.
I'm guessing the programming information is not publicly available --
any pointers on who I should talk to? Zachi, maybe? I'm willing to write
the code if I can get the information, or at the very least, I can be a
pretty quick turnaround tester.
-- 
Dave Dillow <dave at thedillows.org>
-------------- next part --------------
--- docprobe.c.orig	2003-07-30 14:24:34.000000000 -0400
+++ docprobe.c	2003-07-30 14:26:03.000000000 -0400
@@ -135,13 +135,19 @@
 		 window, DOCControl);
 #endif /* !DOC_PASSIVE_PROBE */	
 
-	/* We need to read the ChipID register four times. For some
-	   newer DiskOnChip 2000 units, the first three reads will
-	   return the DiskOnChip Millennium ident. Don't ask. */
-	ReadDOC(window, ChipID);
-	ReadDOC(window, ChipID);
-	ReadDOC(window, ChipID);
+	/* Some newer DiskOnChip 2000 units report as a Millennium.
+	 * To tell these apart, read the ID four times, and if the
+	 * fourth read does not come back as a Millenium, it is a
+	 * newer 2000 unit. */
 	ChipID = ReadDOC(window, ChipID);
+	if (ChipID == DOC_ChipID_DocMil) {
+		ReadDOC(window, ChipID);
+		ReadDOC(window, ChipID);
+		ChipID = ReadDOC(window, ChipID);
+		if (ChipID != DOC_ChipID_DocMil)
+			ChipID = DOC_ChipID_Doc2k;
+	}
+
   
 	switch (ChipID) {
 	case DOC_ChipID_Doc2k:
@@ -151,7 +157,10 @@
 		tmpc = ReadDOC(window, 2k_ECCStatus) & DOC_TOGGLE_BIT;
 		if (tmp != tmpb && tmp == tmpc)
 				return ChipID;
-		break;
+
+		/* The newer DiskOnChip 2000 units use the same toggle
+		 * bit as the Millenium chips, so fall through to that
+		 * test. */
 		
 	case DOC_ChipID_DocMil:
 		/* Check the TOGGLE bit in the ECC register */


More information about the linux-mtd mailing list