This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
82559 Self Test failure
- From: "Cristiano Pereira" <ligieri2002 at hotmail dot com>
- To: ecos-discuss at sources dot redhat dot com
- Date: Wed, 09 Oct 2002 15:29:10 +0000
- Subject: [ECOS] 82559 Self Test failure
- Bcc:
Hi all,
I can't get the code for the Xscale platform to pass through the Self Test
defined
in the function i82559_init(). Did anybody have the same problem. There is
not much
documentation about it and conseguently there is not much I can do for
pinpointing what's wrong.
Here is the code sequence which is failing:
#ifdef DEBUG
os_printf("Init82559 %d @ %x\n82559 SelTest\n",
p_i82559->index, (int)ndp);
#endif
ints = Mask82559Interrupt(p_i82559);
// Reset device
i82559_reset(p_i82559);
// Perform a system self-test. (get enough mem to round address)
if ( (selftest = (cyg_uint32)pciwindow_mem_alloc(32) ) == 0)
return (0);
p_selftest = (cyg_uint32 *) ((selftest + 15) & ~0xf);
p_selftest[0] = p_selftest[1] = -1;
OUTL( (VIRT_TO_BUS(p_selftest)) | I82559_SELFTEST, ioaddr + SCBPort);
//count = 0x7FFFF; // Timeout for self-test.
count = 0x0FFFF; // Timeout for self-test.
do {
udelay(10);
} while ( (p_selftest[1] == -1) && (--count >= 0) );
// Reset device again after selftest
i82559_reset(p_i82559);
Acknowledge82559Interrupt(p_i82559);
UnMask82559Interrupt(p_i82559, ints );
if (count < 0) {
// Test timed out.
#ifdef DEBUG
os_printf("Self test failed\n");
#endif
return (0);
}
The counter is timing out and the function returns at this point.
Thanks,
Cristiano.
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss