PERFORCE change 99194 for review
Warner Losh
imp at FreeBSD.org
Wed Jun 14 02:55:30 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=99194
Change 99194 by imp at imp_Speedy on 2006/06/14 02:52:33
Add a bit of a delay and print the registers out of the mii chip
for debug for the hardware guys.
Affected files ...
.. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#16 edit
Differences ...
==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#16 (text+ko) ====
@@ -384,9 +384,9 @@
{
unsigned short stat2;
unsigned update;
-#if 0
unsigned sec;
int i;
+#if 0
// AT91F_MII_WritePhy(pEmac, 20, 0x70);
AT91F_MII_WritePhy(pEmac, 0x0, 0x3300);
@@ -415,8 +415,13 @@
stat2 = AT91F_MII_ReadPhy(pEmac, MII_STS_REG);
stat2 = AT91F_MII_ReadPhy(pEmac, MII_STS_REG);
if (!(stat2 & MII_STS_LINK_STAT)) {
+ sec = GetSeconds();
printf("emac: missing link status 0x%x\r\n", stat2);
- printf("%x\r\n", AT91F_MII_ReadPhy(pEmac, MII_SPEC_STS_REG));
+ for (i = 0; i <= 0x18; i++)
+ printf("%x ", AT91F_MII_ReadPhy(pEmac, i));
+ printf("\r\n");
+ while (GetSeconds() <= sec + 2) continue;
+ sec = GetSeconds();
AT91F_MII_WritePhy(pEmac, 0x0, 0x3300);
while (AT91F_MII_ReadPhy(pEmac, 0x0) & (1 << 9));
goto again;
More information about the p4-projects
mailing list