ECC Reset problems
Hi,
I'm running linux 2.4.1-pre11 on a powerPC platform. I have been using a 32M doc2000 with no problems. I've just started to use a 48M doc2000 but the On-Chip ECC engine seems to work just once after reset and
not again. It looks like the "ECC Config" Resets function
has stopped working?
Any ideas?
Thanks.
Quoted 5 lines · [email protected] said:
I'm running linux 2.4.1-pre11 on a powerPC platform. I have been
using a 32M doc2000 with no problems. I've just started to use a 48M doc2000 but the On-Chip ECC engine seems to work just once after reset
and not again. It looks like the "ECC Config" Resets function has
stopped working?
Hmmm. I can't see any documented timing constraints on the ECC Reset. But try adding a delay between...
/* Prime the ECC engine */ WriteDOC(DOC_ECC_RESET, docptr, ECCConf); WriteDOC(DOC_ECC_EN, docptr, ECCConf);
Might also be worth looking in include/linux/mtd/doc2000.h and changing the definition of DOC_ECC_RESET to DOC_ECC_RESV instead of zero.
--
dwmw2
Thanks David.
Its seems to be a timing issue, although not with ECC resets. We had to make the following changes to affect all delays used in doc2000.c I had forgotten that I multiplied "cycles" by 6 to make the 32M DOC work. I increased this to 9 and the 48M DOC now works fine.
Would this just be a specific board architecture thing?
Thanks again.
Justin.
/* Perform the required delay cycles by reading from the appropriate
register */
static void DoC_Delay(struct DiskOnChip *doc, unsigned short cycles)
{
volatile char dummy;
int i;
for (i = 0; i < cycles*12; i++) {
if (DoC_is_Millennium(doc))
dummy = ReadDOC(doc->virtadr, NOP);
else
dummy = ReadDOC(doc->virtadr, DOCStatus);
}
}Quoted 19 lines · David Woodhouse
Quoted 5 lines · [email protected] said:
I'm running linux 2.4.1-pre11 on a powerPC platform. I have been
using a 32M doc2000 with no problems. I've just started to use a 48M doc2000 but the On-Chip ECC engine seems to work just once after reset
and not again. It looks like the "ECC Config" Resets function has
stopped working?Hmmm. I can't see any documented timing constraints on the ECC Reset. But try adding a delay between...
/* Prime the ECC engine */ WriteDOC(DOC_ECC_RESET, docptr, ECCConf); WriteDOC(DOC_ECC_EN, docptr, ECCConf);Might also be worth looking in
include/linux/mtd/doc2000.hand changing the definition ofDOC_ECC_RESETtoDOC_ECC_RESVinstead of zero.--
dwmw2