2nd CFI chip detection fails sometimes
Hi,
In cfi_probe.c (line 189)
/* put back previous value, in case we're operating on RAM... */ map->write16(map, tmp, base+ofs); <-- error here #endif /* CFIDEV_INTERLEAVE_1 */ #if defined(CFIDEV_INTERLEAVE_2) ofs = cfi_send_cmd(0x98, base, map, CFIDEV_INTERLEAVE_2,
CFI_DEVICETYPE_X8, &tmp);
The line marked error causes problems because it can put the flash chip into an error state preventing correct detection. We need some way of knowing if it's RAM before we do the write. Suggestions welcome!
David Vrabel
To unsubscribe, send "unsubscribe mtd" to [email protected]
Quoted 4 lines · [email protected] said:
The line marked error causes problems because it can put the flash
chip into an error state preventing correct detection. We need some way of knowing if it's RAM before we do the write. Suggestions welcome!
We should probably only put back the original value if we completely fail to probe the device, _AND_ if it appears to be behaving like RAM (i.e. if the contents of the address are exactly what we wrote to it.
Alternatively, we could accept the fact that we overwrite some bytes in a RAM chip when we unload and reload its driver, and just not bother to write back those bytes at all.
--
dwmw2
To unsubscribe, send "unsubscribe mtd" to [email protected]
I vote for the 2nd solution, as it's much easier and simpler than the 1st one.
Also, I don't know how other people use MTD, but in my case I need to write map drivers for the flash (and specify it's CFI compliant), which implies that I know it's not RAM...
-Stephane
-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of David Woodhouse
Sent: Monday, August 07, 2000 10:34
To: David Vrabel
Cc: [email protected]
Subject: Re: 2nd CFI chip detection fails sometimes
Quoted 4 lines · [email protected] said:
The line marked error causes problems because it can put the flash
chip into an error state preventing correct detection. We need some way of knowing if it's RAM before we do the write. Suggestions welcome!
We should probably only put back the original value if we completely fail to probe the device, _AND_ if it appears to be behaving like RAM (i.e. if the contents of the address are exactly what we wrote to it.
Alternatively, we could accept the fact that we overwrite some bytes in a RAM chip when we unload and reload its driver, and just not bother to write back those bytes at all.
--
dwmw2
To unsubscribe, send "unsubscribe mtd" to [email protected]
To unsubscribe, send "unsubscribe mtd" to [email protected]
You could try to reset the chip before starting a CFI probe.
Eg.
#if defined(CFIDEV_INTERLEAVE_2) ofs = cfi_send_cmd(0xFF, base, map, CFIDEV_INTERLEAVE_2, CFI_DEVICETYPE_X8, &tmp); cfi_send_cmd(0x98, base, map, CFIDEV_INTERLEAVE_2, CFI_DEVICETYPE_X8,
NULL);
This should put the chips in the right state.
-Stephane
-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of David Vrabel
Sent: Monday, August 07, 2000 10:31
To: [email protected]
Subject: 2nd CFI chip detection fails sometimes
Hi,
In cfi_probe.c (line 189)
/* put back previous value, in case we're operating on RAM... */ map->write16(map, tmp, base+ofs); <-- error here #endif /* CFIDEV_INTERLEAVE_1 */ #if defined(CFIDEV_INTERLEAVE_2) ofs = cfi_send_cmd(0x98, base, map, CFIDEV_INTERLEAVE_2,
CFI_DEVICETYPE_X8, &tmp);
The line marked error causes problems because it can put the flash chip into an error state preventing correct detection. We need some way of knowing if it's RAM before we do the write. Suggestions welcome!
David Vrabel
To unsubscribe, send "unsubscribe mtd" to [email protected]
To unsubscribe, send "unsubscribe mtd" to [email protected]